diff options
Diffstat (limited to 'nixos/tests/cadvisor.nix')
-rw-r--r-- | nixos/tests/cadvisor.nix | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/nixos/tests/cadvisor.nix b/nixos/tests/cadvisor.nix index 1644cb856cec..f0083ab18e45 100644 --- a/nixos/tests/cadvisor.nix +++ b/nixos/tests/cadvisor.nix @@ -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/curl -X POST 'http://localhost:8086/db?u=root&p=root' \ - -d '{"name": "root"}' - ''; }; }; @@ -27,6 +23,12 @@ import ./make-test.nix ({ pkgs, ... } : { $machine->succeed("curl http://localhost:8080/containers/"); $influxdb->waitForUnit("influxdb.service"); + + # 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/"); ''; |