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