clanServices: init test clan_lib.metrics.version::get_nixos_systems
This commit is contained in:
@@ -8,11 +8,15 @@ in
|
|||||||
clan.modules.monitoring = module;
|
clan.modules.monitoring = module;
|
||||||
|
|
||||||
perSystem =
|
perSystem =
|
||||||
{ ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
clan.nixosTests.monitoring = {
|
clan.nixosTests.monitoring = {
|
||||||
imports = [ ./tests/vm/default.nix ];
|
imports = [
|
||||||
|
(lib.modules.importApply ./tests/vm/default.nix {
|
||||||
|
inherit (self) packages;
|
||||||
|
inherit pkgs;
|
||||||
|
})
|
||||||
|
];
|
||||||
clan.modules.monitoring = module;
|
clan.modules.monitoring = module;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
{ packages, pkgs, ... }:
|
||||||
{
|
{
|
||||||
name = "monitoring";
|
name = "monitoring";
|
||||||
|
|
||||||
@@ -16,9 +17,27 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraPythonPackages = _p: [
|
||||||
|
(pkgs.python3.pkgs.toPythonModule packages.${pkgs.system}.clan-cli)
|
||||||
|
];
|
||||||
|
|
||||||
testScript =
|
testScript =
|
||||||
{ ... }:
|
{ ... }:
|
||||||
''
|
''
|
||||||
|
import time
|
||||||
start_all()
|
start_all()
|
||||||
|
time.sleep(99999)
|
||||||
|
peer1.wait_for_unit("network-online.target")
|
||||||
|
peer1.wait_for_unit("telegraf.service")
|
||||||
|
|
||||||
|
from clan_lib.metrics.version import get_nixos_systems
|
||||||
|
from clan_lib.machines.machines import Machine as ClanMachine
|
||||||
|
from clan_lib.flake import Flake
|
||||||
|
|
||||||
|
# mymachine = ClanMachine("peer1", Flake("."))
|
||||||
|
# data = get_nixos_systems(mymachine, )
|
||||||
|
# assert data["current_system"] is not None
|
||||||
|
|
||||||
|
time.sleep(99999)
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user