nixos/beanstalkd: port test to python
This commit is contained in:
parent
f794de4e31
commit
db54622145
@ -1,4 +1,4 @@
|
|||||||
import ./make-test.nix ({ pkgs, lib, ... }:
|
import ./make-test-python.nix ({ pkgs, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
pythonEnv = pkgs.python3.withPackages (p: [p.beanstalkc]);
|
pythonEnv = pkgs.python3.withPackages (p: [p.beanstalkc]);
|
||||||
@ -34,12 +34,16 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
testScript = ''
|
testScript = ''
|
||||||
startAll;
|
start_all()
|
||||||
|
|
||||||
$machine->waitForUnit('beanstalkd.service');
|
machine.wait_for_unit("beanstalkd.service")
|
||||||
|
|
||||||
$machine->succeed("${produce}");
|
machine.succeed("${produce}")
|
||||||
$machine->succeed("${consume}") eq "this is a job\n" or die;
|
assert "this is a job\n" == machine.succeed(
|
||||||
$machine->succeed("${consume}") eq "this is another job\n" or die;
|
"${consume}"
|
||||||
|
)
|
||||||
|
assert "this is another job\n" == machine.succeed(
|
||||||
|
"${consume}"
|
||||||
|
)
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user