forked from mtusi2026/mtusi2026lab5
абораторная 5: брокер, worker, outbox, варианты изображений, тесты отказов (оценка 4)
This commit is contained in:
@@ -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()
|
||||
Reference in New Issue
Block a user