Fix test: clean up systemd service between tests

This commit is contained in:
centra 2026-02-17 17:46:45 +09:00
parent 417a19700b
commit fb54666294
Signed by: centra
GPG key ID: 0C09689D20B25ACA

View file

@ -237,6 +237,11 @@ in
if interface_exists("ls-guard"):
client.succeed("ip link del ls-guard 2>/dev/null || true")
# Clean up systemd service from previous test
client.execute("systemctl stop lightscale-agent.service 2>/dev/null || true")
client.execute("systemctl reset-failed lightscale-agent.service 2>/dev/null || true")
time.sleep(1)
# =======================================================================
# TEST 4: Cleanup Before Start (--cleanup-before-start)
# Purpose: Verify that leftover interfaces from previous crashes