cadvisor: fix test
This commit is contained in:
parent
fe54db9027
commit
db387a6f0d
|
@ -13,10 +13,6 @@ import ./make-test.nix ({ pkgs, ... } : {
|
||||||
services.cadvisor.enable = true;
|
services.cadvisor.enable = true;
|
||||||
services.cadvisor.storageDriver = "influxdb";
|
services.cadvisor.storageDriver = "influxdb";
|
||||||
services.influxdb.enable = true;
|
services.influxdb.enable = true;
|
||||||
systemd.services.influxdb.postStart = mkAfter ''
|
|
||||||
${pkgs.curl.bin}/bin/curl -X POST 'http://localhost:8086/db?u=root&p=root' \
|
|
||||||
-d '{"name": "root"}'
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -27,6 +23,15 @@ import ./make-test.nix ({ pkgs, ... } : {
|
||||||
$machine->succeed("curl http://localhost:8080/containers/");
|
$machine->succeed("curl http://localhost:8080/containers/");
|
||||||
|
|
||||||
$influxdb->waitForUnit("influxdb.service");
|
$influxdb->waitForUnit("influxdb.service");
|
||||||
|
|
||||||
|
# Wait until influxdb admin interface is available
|
||||||
|
$influxdb->waitUntilSucceeds("curl -f 127.0.0.1:8083");
|
||||||
|
|
||||||
|
# create influxdb database
|
||||||
|
$influxdb->succeed(q~
|
||||||
|
curl -XPOST http://localhost:8086/query --data-urlencode "q=CREATE DATABASE root"
|
||||||
|
~);
|
||||||
|
|
||||||
$influxdb->waitForUnit("cadvisor.service");
|
$influxdb->waitForUnit("cadvisor.service");
|
||||||
$influxdb->succeed("curl http://localhost:8080/containers/");
|
$influxdb->succeed("curl http://localhost:8080/containers/");
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue