nixosTests.initdb: Move code to existing postgres test
This commit is contained in:
parent
fff1c2867f
commit
abebf8cdb3
|
@ -1,19 +0,0 @@
|
||||||
import ./make-test-python.nix ({ pkgs, latestKernel ? false, ... }: {
|
|
||||||
name = "pg-initdb";
|
|
||||||
|
|
||||||
machine = {...}:
|
|
||||||
{
|
|
||||||
documentation.enable = false;
|
|
||||||
services.postgresql.enable = true;
|
|
||||||
services.postgresql.package = pkgs.postgresql_9_6;
|
|
||||||
environment.pathsToLink = [
|
|
||||||
"/share/postgresql"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
testScript = ''
|
|
||||||
machine.start()
|
|
||||||
machine.succeed("sudo -u postgres initdb -D /tmp/testpostgres2")
|
|
||||||
machine.shutdown()
|
|
||||||
'';
|
|
||||||
})
|
|
|
@ -76,6 +76,9 @@ let
|
||||||
"stat -c '%a' /var/backup/postgresql/${backupName}.sql.gz | grep 600",
|
"stat -c '%a' /var/backup/postgresql/${backupName}.sql.gz | grep 600",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
with subtest("Initdb works"):
|
||||||
|
machine.succeed("sudo -u postgres initdb -D /tmp/testpostgres2")
|
||||||
|
|
||||||
machine.shutdown()
|
machine.shutdown()
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue