Merge pull request #73057 from flokli/nixos-test-port-smokeping

nixos/smokeping: port test to python
This commit is contained in:
worldofpeace 2019-11-08 20:47:40 +00:00 committed by GitHub
commit 9cc610c576
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
import ./make-test.nix ({ pkgs, ...} : {
import ./make-test-python.nix ({ pkgs, ...} : {
name = "smokeping";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ cransom ];
@ -22,12 +22,12 @@ import ./make-test.nix ({ pkgs, ...} : {
};
testScript = ''
startAll;
$sm->waitForUnit("smokeping");
$sm->waitForUnit("thttpd");
$sm->waitForFile("/var/lib/smokeping/data/Local/LocalMachine.rrd");
$sm->succeed("curl -s -f localhost:8081/smokeping.fcgi?target=Local");
$sm->succeed("ls /var/lib/smokeping/cache/Local/LocalMachine_mini.png");
$sm->succeed("ls /var/lib/smokeping/cache/index.html");
start_all()
sm.wait_for_unit("smokeping")
sm.wait_for_unit("thttpd")
sm.wait_for_file("/var/lib/smokeping/data/Local/LocalMachine.rrd")
sm.succeed("curl -s -f localhost:8081/smokeping.fcgi?target=Local")
sm.succeed("ls /var/lib/smokeping/cache/Local/LocalMachine_mini.png")
sm.succeed("ls /var/lib/smokeping/cache/index.html")
'';
})