абораторная 5: брокер, worker, outbox, варианты изображений, тесты отказов (оценка 4)

This commit is contained in:
kalibr456
2026-10-24 16:03:46 +03:00
parent 276dbdad8a
commit 9863bb0505
112 changed files with 10533 additions and 26 deletions
+16
View File
@@ -0,0 +1,16 @@
from common import call, compose_output, new_user
def main():
user = new_user("demo")
print(f"logged in once as {user['username']}; 8 requests with the same Bearer token:")
for number in range(1, 9):
reply = call("GET", "/api/v1/users/me", 200, token=user["token"])
print(f" {number}. GET /api/v1/users/me -> {reply.status}, X-Instance-Id: {reply.instance}")
print()
print(compose_output("ps", "--format", "table {{.Service}}\t{{.ID}}\t{{.Status}}", "api").strip())
if __name__ == "__main__":
main()