mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 05:43:50 +03:00
2d2c311304
* influxdb module: add postStart * cadvisor module: increase TimeoutStartSec Under high load, the cadvisor module can take longer than the default 90 seconds to start. This change should hopefully fix the test on Hydra.
36 lines
938 B
Nix
36 lines
938 B
Nix
import ./make-test.nix ({ pkgs, ... } : {
|
|
name = "cadvisor";
|
|
meta = with pkgs.stdenv.lib.maintainers; {
|
|
maintainers = [ offline ];
|
|
};
|
|
|
|
nodes = {
|
|
machine = { config, pkgs, ... }: {
|
|
services.cadvisor.enable = true;
|
|
};
|
|
|
|
influxdb = { config, pkgs, lib, ... }: with lib; {
|
|
services.cadvisor.enable = true;
|
|
services.cadvisor.storageDriver = "influxdb";
|
|
services.influxdb.enable = true;
|
|
};
|
|
};
|
|
|
|
testScript =
|
|
''
|
|
startAll;
|
|
$machine->waitForUnit("cadvisor.service");
|
|
$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/");
|
|
'';
|
|
})
|