depot/third_party/nixpkgs/nixos/tests/soju.nix
Default email 5ca88bfbb9 Project import generated by Copybara.
GitOrigin-RevId: 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58
2024-07-31 10:19:44 +00:00

31 lines
667 B
Nix

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";
meta.maintainers = [ ];
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}")
'';
})