nixos/cadvisor: port test to python
This commit is contained in:
parent
2f7199af21
commit
349c14f950
|
@ -1,4 +1,4 @@
|
||||||
import ./make-test.nix ({ pkgs, ... } : {
|
import ./make-test-python.nix ({ pkgs, ... } : {
|
||||||
name = "cadvisor";
|
name = "cadvisor";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ offline ];
|
maintainers = [ offline ];
|
||||||
|
@ -16,20 +16,19 @@ import ./make-test.nix ({ pkgs, ... } : {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
testScript =
|
testScript = ''
|
||||||
''
|
start_all()
|
||||||
startAll;
|
machine.wait_for_unit("cadvisor.service")
|
||||||
$machine->waitForUnit("cadvisor.service");
|
machine.succeed("curl http://localhost:8080/containers/")
|
||||||
$machine->succeed("curl http://localhost:8080/containers/");
|
|
||||||
|
|
||||||
$influxdb->waitForUnit("influxdb.service");
|
influxdb.wait_for_unit("influxdb.service")
|
||||||
|
|
||||||
# create influxdb database
|
# create influxdb database
|
||||||
$influxdb->succeed(q~
|
influxdb.succeed(
|
||||||
curl -XPOST http://localhost:8086/query --data-urlencode "q=CREATE DATABASE root"
|
'curl -XPOST http://localhost:8086/query --data-urlencode "q=CREATE DATABASE root"'
|
||||||
~);
|
)
|
||||||
|
|
||||||
$influxdb->waitForUnit("cadvisor.service");
|
influxdb.wait_for_unit("cadvisor.service")
|
||||||
$influxdb->succeed("curl http://localhost:8080/containers/");
|
influxdb.succeed("curl http://localhost:8080/containers/")
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue