nixosTests.cadvisor: handleTest -> runTest

Changed files
+27 -33
nixos
+1 -1
nixos/tests/all-tests.nix
···
buildkite-agents = runTest ./buildkite-agents.nix;
c2fmzq = runTest ./c2fmzq.nix;
caddy = runTest ./caddy.nix;
-
cadvisor = handleTestOn [ "x86_64-linux" ] ./cadvisor.nix { };
+
cadvisor = runTestOn [ "x86_64-linux" ] ./cadvisor.nix;
cage = runTest ./cage.nix;
cagebreak = runTest ./cagebreak.nix;
calibre-web = runTest ./calibre-web.nix;
+26 -32
nixos/tests/cadvisor.nix
···
-
import ./make-test-python.nix (
-
{ lib, pkgs, ... }:
-
{
-
name = "cadvisor";
-
meta.maintainers = with lib.maintainers; [ offline ];
+
{ lib, ... }:
+
{
+
name = "cadvisor";
+
meta.maintainers = with lib.maintainers; [ offline ];
-
nodes = {
-
machine =
-
{ ... }:
-
{
-
services.cadvisor.enable = true;
-
};
+
nodes = {
+
machine = {
+
services.cadvisor.enable = true;
+
};
-
influxdb =
-
{ lib, ... }:
-
{
-
services.cadvisor.enable = true;
-
services.cadvisor.storageDriver = "influxdb";
-
services.influxdb.enable = true;
-
};
+
influxdb = {
+
services.cadvisor.enable = true;
+
services.cadvisor.storageDriver = "influxdb";
+
services.influxdb.enable = true;
};
+
};
-
testScript = ''
-
start_all()
-
machine.wait_for_unit("cadvisor.service")
-
machine.succeed("curl -f http://localhost:8080/containers/")
+
testScript = ''
+
start_all()
+
machine.wait_for_unit("cadvisor.service")
+
machine.succeed("curl -f http://localhost:8080/containers/")
-
influxdb.wait_for_unit("influxdb.service")
+
influxdb.wait_for_unit("influxdb.service")
-
# create influxdb database
-
influxdb.succeed(
-
'curl -f -XPOST http://localhost:8086/query --data-urlencode "q=CREATE DATABASE root"'
-
)
+
# create influxdb database
+
influxdb.succeed(
+
'curl -f -XPOST http://localhost:8086/query --data-urlencode "q=CREATE DATABASE root"'
+
)
-
influxdb.wait_for_unit("cadvisor.service")
-
influxdb.succeed("curl -f http://localhost:8080/containers/")
-
'';
-
}
-
)
+
influxdb.wait_for_unit("cadvisor.service")
+
influxdb.succeed("curl -f http://localhost:8080/containers/")
+
'';
+
}