sshd: 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 = {
|
||||||
sshd = lib.modules.importApply ./default.nix { };
|
sshd = module;
|
||||||
};
|
};
|
||||||
|
|
||||||
perSystem =
|
perSystem =
|
||||||
{ pkgs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
checks = lib.optionalAttrs (pkgs.stdenv.isLinux) {
|
clan.nixosTests.sshd = {
|
||||||
sshd = import ./tests/vm/default.nix {
|
imports = [ ./tests/vm/default.nix ];
|
||||||
inherit pkgs;
|
|
||||||
clan-core = self;
|
clan.modules."@clan/sshd" = module;
|
||||||
nixosLib = import (self.inputs.nixpkgs + "/nixos/lib") { };
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,24 +1,13 @@
|
|||||||
{
|
{
|
||||||
|
module,
|
||||||
pkgs,
|
pkgs,
|
||||||
nixosLib,
|
|
||||||
clan-core,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
nixosLib.runTest (
|
|
||||||
{ ... }:
|
|
||||||
{
|
{
|
||||||
imports = [
|
|
||||||
clan-core.modules.nixosVmTest.clanTest
|
|
||||||
];
|
|
||||||
|
|
||||||
hostPkgs = pkgs;
|
|
||||||
|
|
||||||
name = "sshd";
|
name = "sshd";
|
||||||
|
|
||||||
clan = {
|
clan = {
|
||||||
directory = ./.;
|
directory = ./.;
|
||||||
modules."@clan/sshd" = ../../default.nix;
|
|
||||||
inventory = {
|
inventory = {
|
||||||
machines.server = { };
|
machines.server = { };
|
||||||
machines.client = { };
|
machines.client = { };
|
||||||
@@ -59,4 +48,3 @@ nixosLib.runTest (
|
|||||||
client.succeed("grep '^.cert-authority ssh-ca.*example.com ssh-ed25519 ' /etc/ssh/ssh_known_hosts")
|
client.succeed("grep '^.cert-authority ssh-ca.*example.com ssh-ed25519 ' /etc/ssh/ssh_known_hosts")
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user