Skip to content

Commit

Permalink
test: small test for UpheldBy
Browse files Browse the repository at this point in the history
  • Loading branch information
aksiksi committed Feb 3, 2025
1 parent 7d88640 commit 8941b4f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions nixos-test/test.nix
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ in
# for DNS settings, especially for Podman.
m.succeed(f"{runtime} exec -it myproject-service-a wget http://no-restart")
# Verify UpheldBy behavior by stopping the volume service and ensuring
# that the container goes down, then comes up after the volume is started.
m.systemctl(f"stop {runtime}-volume-storage.service")
m.wait_until_fails(f"{runtime}-myproject-service-a.service")
m.systemctl(f"start {runtime}-volume-storage.service")
m.wait_for_unit(f"{runtime}-myproject-service-a.service")
# Stop the root unit.
m.systemctl(f"stop {runtime}-compose-myproject-root.target")
'';
Expand Down

0 comments on commit 8941b4f

Please sign in to comment.