forked from Fediversity/Fediversity
WIP: expose service tests in flake
This commit is contained in:
parent
aef414ffe8
commit
3b719cea53
6 changed files with 21 additions and 18 deletions
|
@ -17,6 +17,8 @@
|
||||||
./infra/flake-part.nix
|
./infra/flake-part.nix
|
||||||
./keys/flake-part.nix
|
./keys/flake-part.nix
|
||||||
./secrets/flake-part.nix
|
./secrets/flake-part.nix
|
||||||
|
./secrets/flake-part.nix
|
||||||
|
./services/tests/flake-part.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
perSystem =
|
perSystem =
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
{
|
|
||||||
system ? builtins.currentSystem,
|
|
||||||
sources ? import ../npins,
|
|
||||||
pkgs ? import sources.nixpkgs { inherit system; },
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
tests = {
|
|
||||||
mastodon = pkgs.nixosTest ./tests/mastodon.nix;
|
|
||||||
pixelfed-garage = pkgs.nixosTest ./tests/pixelfed-garage.nix;
|
|
||||||
peertube = pkgs.nixosTest ./tests/peertube.nix;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -49,7 +49,7 @@ in
|
||||||
displayName = mkOption {
|
displayName = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
description = "Name of the initial user, for humans";
|
description = "Name of the initial user, for humans";
|
||||||
default = config.fediversity.temp.initialUser.name;
|
default = config.fediversity.temp.initialUser.username;
|
||||||
};
|
};
|
||||||
email = mkOption {
|
email = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
|
|
14
services/tests/flake-part.nix
Normal file
14
services/tests/flake-part.nix
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
_class = "flake";
|
||||||
|
|
||||||
|
perSystem =
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
checks = {
|
||||||
|
test-mastodon-service = pkgs.testers.runNixOSTest ./mastodon.nix;
|
||||||
|
test-pixelfed-garage-service = pkgs.testers.runNixOSTest ./pixelfed-garage.nix;
|
||||||
|
test-peertube-service = pkgs.testers.runNixOSTest ./peertube.nix;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -69,8 +69,8 @@ in
|
||||||
expect
|
expect
|
||||||
];
|
];
|
||||||
environment.variables = {
|
environment.variables = {
|
||||||
AWS_ACCESS_KEY_ID = config.fediversity.garage.ensureKeys.mastodon.id;
|
AWS_ACCESS_KEY_ID = "$(cat ${config.fediversity.mastodon.s3AccessKeyFile})";
|
||||||
AWS_SECRET_ACCESS_KEY = config.fediversity.garage.ensureKeys.mastodon.secret;
|
AWS_SECRET_ACCESS_KEY = "$(cat ${config.fediversity.mastodon.s3SecretKeyFile})";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -161,8 +161,8 @@ in
|
||||||
];
|
];
|
||||||
environment.variables = {
|
environment.variables = {
|
||||||
POST_MEDIA = ./fediversity.png;
|
POST_MEDIA = ./fediversity.png;
|
||||||
AWS_ACCESS_KEY_ID = config.fediversity.garage.ensureKeys.pixelfed.id;
|
AWS_ACCESS_KEY_ID = "$(cat ${config.fediversity.pixelfed.s3AccessKeyFile})";
|
||||||
AWS_SECRET_ACCESS_KEY = config.fediversity.garage.ensureKeys.pixelfed.secret;
|
AWS_SECRET_ACCESS_KEY = "$(cat ${config.fediversity.pixelfed.s3SecretKeyFile})";
|
||||||
## without this we get frivolous errors in the logs
|
## without this we get frivolous errors in the logs
|
||||||
MC_REGION = "garage";
|
MC_REGION = "garage";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue