garage: migrate to clan.nixosTests module
This commit is contained in:
@@ -1,18 +1,19 @@
|
|||||||
{ lib, self, ... }:
|
{ lib, ... }:
|
||||||
|
let
|
||||||
|
module = lib.modules.importApply ./default.nix { };
|
||||||
|
in
|
||||||
{
|
{
|
||||||
clan.modules = {
|
clan.modules = {
|
||||||
garage = lib.modules.importApply ./default.nix { };
|
garage = module;
|
||||||
};
|
};
|
||||||
|
|
||||||
perSystem =
|
perSystem =
|
||||||
{ pkgs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
checks = lib.optionalAttrs (pkgs.stdenv.isLinux) {
|
clan.nixosTests.garage = {
|
||||||
garage = import ./tests/vm/default.nix {
|
imports = [ ./tests/vm/default.nix ];
|
||||||
inherit pkgs;
|
|
||||||
clan-core = self;
|
clan.modules."@clan/garage" = module;
|
||||||
nixosLib = import (self.inputs.nixpkgs + "/nixos/lib") { };
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,23 +1,13 @@
|
|||||||
{
|
{
|
||||||
|
module,
|
||||||
pkgs,
|
pkgs,
|
||||||
nixosLib,
|
|
||||||
clan-core,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
nixosLib.runTest (
|
{
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
clan-core.modules.nixosVmTest.clanTest
|
|
||||||
];
|
|
||||||
|
|
||||||
hostPkgs = pkgs;
|
|
||||||
|
|
||||||
name = "garage";
|
name = "garage";
|
||||||
|
|
||||||
clan = {
|
clan = {
|
||||||
directory = ./.;
|
directory = ./.;
|
||||||
modules."@clan/garage" = ../../default.nix;
|
|
||||||
inventory = {
|
inventory = {
|
||||||
machines.server = { };
|
machines.server = { };
|
||||||
|
|
||||||
@@ -83,5 +73,4 @@ nixosLib.runTest (
|
|||||||
server.succeed("${pkgs.netcat}/bin/nc -z -v 127.0.0.1 3902")
|
server.succeed("${pkgs.netcat}/bin/nc -z -v 127.0.0.1 3902")
|
||||||
server.succeed("${pkgs.netcat}/bin/nc -z -v 127.0.0.1 3903")
|
server.succeed("${pkgs.netcat}/bin/nc -z -v 127.0.0.1 3903")
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user