Test foreman.target stops and starts IOP services - #701
Conversation
Verify that systemctl stop foreman.target brings down all IOP containers and that starting it brings them back. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Looks good to me..Covers start and stop :) |
|
Is there a cheaper way to test this? Can we verify that the iop services are correctly part of the |
Probably we could dynamically discover all |
| for service in services: | ||
| # Skip timer-triggered services (cleanup, vmaas-sync) | ||
| triggered_by = server.run(f"systemctl show {service} -p TriggeredBy --value") | ||
| if triggered_by.stdout.strip(): | ||
| continue | ||
| result = server.run(f"systemctl show {service} -p PartOf --value") | ||
| if "foreman.target" not in result.stdout: | ||
| missing.append(service) |
There was a problem hiding this comment.
testinfra has service.systemd_properties, so I assume (untested) the following should work:
for service_name in services:
service = server.service(service_name)
if service.systemd_properties.get("TriggeredBy"):
continue
assert "foreman.target" in service.systemd_properties.get("PartOf")
There was a problem hiding this comment.
Summary
tests/feature/iop/verifying thatsystemctl stop foreman.targetbrings down all IOP containers andsystemctl start foreman.targetbrings them back.slowsince it involves a full stop/start cycle (~2 min).Context
Companion test for #592 which adds
PartOf=foreman.targetandWantedBy=foreman.targetto all IOP quadlet units.🤖 Generated with Claude Code