mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-24 03:43:53 +03:00
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.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/");
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user