Merge pull request #18624 from ericsagnes/fix/cadvisor
Cadvisor: update and fix test
This commit is contained in:
commit
00b7c5c5c2
@ -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/");
|
||||
'';
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "cadvisor-${version}";
|
||||
version = "0.10.1";
|
||||
version = "0.23.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "google";
|
||||
repo = "cadvisor";
|
||||
rev = "${version}";
|
||||
sha256 = "0k0qfhw755k3ripsfkhml0ixaglhy64hdzxrjvlmbgc50s3j37vh";
|
||||
rev = "v${version}";
|
||||
sha256 = "0wan6a4rpyh5fflq88saznyf2kiic9nmj8sil1s49nh3c3y4yxcj";
|
||||
};
|
||||
|
||||
buildInputs = [ go ];
|
||||
|
Loading…
Reference in New Issue
Block a user