2023-10-02 03:56:37 +03:00
|
|
|
import ./make-test-python.nix ({ pkgs, lib, ... }:
|
|
|
|
let
|
|
|
|
certs = import ./common/acme/server/snakeoil-certs.nix;
|
|
|
|
domain = certs.domain;
|
|
|
|
|
|
|
|
user = "testuser";
|
|
|
|
pass = "hunter2";
|
|
|
|
in
|
|
|
|
{
|
|
|
|
name = "soju";
|
2024-07-28 17:44:11 +03:00
|
|
|
meta.maintainers = [ ];
|
2023-10-02 03:56:37 +03:00
|
|
|
|
|
|
|
nodes.machine = { ... }: {
|
|
|
|
services.soju = {
|
|
|
|
enable = true;
|
|
|
|
adminSocket.enable = true;
|
|
|
|
hostName = domain;
|
|
|
|
tlsCertificate = certs.${domain}.cert;
|
|
|
|
tlsCertificateKey = certs.${domain}.key;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
testScript = ''
|
|
|
|
start_all()
|
|
|
|
|
|
|
|
machine.wait_for_unit("soju")
|
|
|
|
machine.wait_for_file("/run/soju/admin")
|
|
|
|
|
|
|
|
machine.succeed("sojuctl user create -username ${user} -password ${pass}")
|
|
|
|
'';
|
|
|
|
})
|