minecraft: fix nix test
This commit is contained in:
parent
a455d592b4
commit
f7c2c441ac
@ -57,6 +57,9 @@ testPkgs.testers.runNixOSTest {
|
|||||||
# Enable caddy service (required by minecraft service)
|
# Enable caddy service (required by minecraft service)
|
||||||
services.caddy.enable = true;
|
services.caddy.enable = true;
|
||||||
|
|
||||||
|
# Enable networking for the test (needed for minecraft mods to download mappings)
|
||||||
|
networking.dhcpcd.enable = true;
|
||||||
|
|
||||||
# Disable the ZFS mount dependency service in test environment
|
# Disable the ZFS mount dependency service in test environment
|
||||||
systemd.services."minecraft-server-main_mounts".enable = lib.mkForce false;
|
systemd.services."minecraft-server-main_mounts".enable = lib.mkForce false;
|
||||||
|
|
||||||
@ -85,9 +88,12 @@ testPkgs.testers.runNixOSTest {
|
|||||||
# Wait for minecraft service to be available
|
# Wait for minecraft service to be available
|
||||||
machine.wait_for_unit("minecraft-server-main.service")
|
machine.wait_for_unit("minecraft-server-main.service")
|
||||||
|
|
||||||
machine.sleep(20)
|
machine.sleep(60)
|
||||||
|
|
||||||
# Check that the service is active and not failed
|
# Check that the service is active and not failed
|
||||||
machine.succeed("systemctl is-active minecraft-server-main.service")
|
machine.succeed("systemctl is-active minecraft-server-main.service")
|
||||||
|
|
||||||
|
# Check for the Minecraft server startup completion message
|
||||||
|
machine.succeed("grep -Eq '\\[[0-9]+:[0-9]+:[0-9]+\\] \\[Server thread/INFO\\]: Done \\([0-9]+\\.[0-9]+s\\)! For help, type \"help\"' /var/lib/minecraft/main/logs/latest.log")
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user