mirror of
https://github.com/lxstinthesky/matrix.git
synced 2025-11-02 17:02:47 +00:00
A simple flake setup with tests and VM support
This commit is contained in:
25
nix/tests/test1.nix
Normal file
25
nix/tests/test1.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{ pkgs ? import <nixpkgs> {} }:
|
||||
|
||||
pkgs.nixosTest {
|
||||
name = "matrix-login-test";
|
||||
|
||||
nodes = {
|
||||
machine = { config, pkgs, ... }: {
|
||||
imports = [
|
||||
../configuration.nix
|
||||
];
|
||||
|
||||
# Test configuration
|
||||
virtualisation.memorySize = 2048;
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
start_all()
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
|
||||
with subtest("SSH service test"):
|
||||
machine.wait_for_unit("sshd.service")
|
||||
machine.wait_for_open_port(22)
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user