cadvisor: fix test

This commit is contained in:
Eric Sagnes 2016-09-15 21:28:41 +09:00
parent fe54db9027
commit db387a6f0d

View file

@ -13,10 +13,6 @@ import ./make-test.nix ({ pkgs, ... } : {
services.cadvisor.enable = true;
services.cadvisor.storageDriver = "influxdb";
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/");
$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->succeed("curl http://localhost:8080/containers/");
'';