mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 04:02:55 +03:00
nixosTests.initdb: port to python
This commit is contained in:
parent
c0b70f0e35
commit
c44331dd5d
@ -1,26 +1,19 @@
|
||||
let
|
||||
pkgs = import <nixpkgs> { };
|
||||
in
|
||||
with import <nixpkgs/nixos/lib/testing.nix> { inherit pkgs; system = builtins.currentSystem; };
|
||||
with pkgs.lib;
|
||||
import ./make-test-python.nix ({ pkgs, latestKernel ? false, ... }: {
|
||||
name = "pg-initdb";
|
||||
|
||||
makeTest {
|
||||
name = "pg-initdb";
|
||||
machine = {...}:
|
||||
{
|
||||
documentation.enable = false;
|
||||
services.postgresql.enable = true;
|
||||
services.postgresql.package = pkgs.postgresql_9_6;
|
||||
environment.pathsToLink = [
|
||||
"/share/postgresql"
|
||||
];
|
||||
};
|
||||
|
||||
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;
|
||||
'';
|
||||
|
||||
}
|
||||
testScript = ''
|
||||
machine.start()
|
||||
machine.succeed("sudo -u postgres initdb -D /tmp/testpostgres2")
|
||||
machine.shutdown()
|
||||
'';
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user