Skip to content

Commit

Permalink
Add simple tests for set-timezone and set-locale
Browse files Browse the repository at this point in the history
Signed-off-by: Santtu Lakkala <[email protected]>
  • Loading branch information
slakkala committed Oct 9, 2024
1 parent afd8119 commit 093055b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions nixos/tests/admin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,12 @@ in
swaymsg("exec ssh -R /tmp/vsock:/tmp/vsock -f -N ${addrs.appvm}")
time.sleep(5) # Give ssh some time to setup remote socket
with subtest("set locale and timezone"):
print(hostvm.succeed("${cli} --addr ${nodes.adminvm.config.givc.admin.addr} --port ${nodes.adminvm.config.givc.admin.port} --cacert ${nodes.hostvm.givc.host.tls.caCertPath} --cert ${nodes.hostvm.givc.host.tls.certPath} --key ${nodes.hostvm.givc.host.tls.keyPath} ${if tls then "" else "--notls"} --name ${nodes.adminvm.config.givc.admin.name} set-locale en_US.UTF-8"))
adminvm.wait_for_file("/etc/locale-givc.conf")
print(hostvm.succeed("${cli} --addr ${nodes.adminvm.config.givc.admin.addr} --port ${nodes.adminvm.config.givc.admin.port} --cacert ${nodes.hostvm.givc.host.tls.caCertPath} --cert ${nodes.hostvm.givc.host.tls.certPath} --key ${nodes.hostvm.givc.host.tls.keyPath} ${if tls then "" else "--notls"} --name ${nodes.adminvm.config.givc.admin.name} set-timezone UTC"))
adminvm.wait_for_file("/etc/timezone.conf")
with subtest("Clean run"):
print(hostvm.succeed("${cli} --addr ${nodes.adminvm.config.givc.admin.addr} --port ${nodes.adminvm.config.givc.admin.port} --cacert ${nodes.hostvm.givc.host.tls.caCertPath} --cert ${nodes.hostvm.givc.host.tls.certPath} --key ${nodes.hostvm.givc.host.tls.keyPath} ${if tls then "" else "--notls"} --name ${nodes.adminvm.config.givc.admin.name} start foot"))
time.sleep(10) # Give few seconds to application to spin up
Expand Down

0 comments on commit 093055b

Please sign in to comment.