clanServices: init test clan_lib.metrics.version::get_nixos_systems
This commit is contained in:
@@ -8,11 +8,15 @@ in
|
||||
clan.modules.monitoring = module;
|
||||
|
||||
perSystem =
|
||||
{ ... }:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
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;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{ packages, pkgs, ... }:
|
||||
{
|
||||
name = "monitoring";
|
||||
|
||||
@@ -16,9 +17,27 @@
|
||||
};
|
||||
};
|
||||
|
||||
extraPythonPackages = _p: [
|
||||
(pkgs.python3.pkgs.toPythonModule packages.${pkgs.system}.clan-cli)
|
||||
];
|
||||
|
||||
testScript =
|
||||
{ ... }:
|
||||
''
|
||||
import time
|
||||
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