diff --git a/Makefile b/Makefile index c9eca4d2..4e1eb6bd 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ bootstrap: python3 scripts/bootstrap.py up: bootstrap - docker compose up -d --build --wait + VCS_REF=$$(git rev-parse HEAD) docker compose up -d --build --wait down: docker compose down diff --git a/scripts/verify_lifecycle.py b/scripts/verify_lifecycle.py index a2f88a22..1de29aa9 100644 --- a/scripts/verify_lifecycle.py +++ b/scripts/verify_lifecycle.py @@ -169,12 +169,18 @@ def main(): short_actor = short.user("expiry") start = time.monotonic() short.call("GET", "/api/v1/users/me", actor=short_actor, schema="User") - time.sleep(2.2) + time.sleep(1.0) + compose("-f", "compose.yaml", "-f", "compose.test.yaml", "restart", "api-short") + wait(short) + remaining = 2.2 - (time.monotonic() - start) + if remaining > 0: + time.sleep(remaining) short.call("GET", "/api/v1/users/me", 401, actor=short_actor) result["expiry"] = { "configured_ttl_seconds": 2, "observed_after_seconds": round(time.monotonic() - start, 4), "expired_status": 401, + "short_api_restarted_before_check": True, } c.call("DELETE", "/api/v1/auth/sessions/current", 204, actor=alice) c.call("GET", "/api/v1/users/me", 401, actor=alice)