0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 14:10:33 +03:00
nixpkgs/nixos/tests/cadvisor.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
799 B
Nix
Raw Normal View History

{ lib, ... }:
{
name = "cadvisor";
meta.maintainers = with lib.maintainers; [ offline ];
2014-12-28 20:21:41 +01:00
nodes = {
machine = {
services.cadvisor.enable = true;
};
2014-12-28 20:21:41 +01:00
influxdb = {
services.cadvisor.enable = true;
services.cadvisor.storageDriver = "influxdb";
services.influxdb.enable = true;
2014-12-28 20:21:41 +01:00
};
};
2014-12-28 20:21:41 +01:00
testScript = ''
start_all()
machine.wait_for_unit("cadvisor.service")
machine.succeed("curl -f http://localhost:8080/containers/")
2014-12-28 20:21:41 +01:00
influxdb.wait_for_unit("influxdb.service")
2016-09-15 21:28:41 +09:00
# create influxdb database
influxdb.succeed(
'curl -f -XPOST http://localhost:8086/query --data-urlencode "q=CREATE DATABASE root"'
)
2016-09-15 21:28:41 +09:00
influxdb.wait_for_unit("cadvisor.service")
influxdb.succeed("curl -f http://localhost:8080/containers/")
'';
}