forked from SamohvalovAndreyBPI2302/mtusi2026lab1
ЛР1 на 4: in-memory API, Docker, student-tests и конкурентная проверка.
Реализован контракт lab1 (X-User-Id), non-root образ, SIGTERM ≤10s, DEFENSE/REPORT.
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
python3 scripts/check_contract.py
|
||||
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
|
||||
@@ -0,0 +1,5 @@
|
||||
=== RUN TestConcurrentHundredMessages
|
||||
api_test.go:258: elapsed=6.151083ms unique=100
|
||||
--- PASS: TestConcurrentHundredMessages (0.01s)
|
||||
PASS
|
||||
ok mtusi2026lab1/student-tests 0.203s
|
||||
@@ -0,0 +1,4 @@
|
||||
ERROR: Cannot connect to the Docker daemon at unix:///Users/family/.docker/run/docker.sock. Is the docker daemon running?
|
||||
build_ok
|
||||
Tue Dec 1 21:49:57 MSK 2026
|
||||
916884c27d17 14.4MB
|
||||
@@ -0,0 +1,5 @@
|
||||
? mtusi2026lab1/cmd/server [no test files]
|
||||
? mtusi2026lab1/internal/api [no test files]
|
||||
? mtusi2026lab1/internal/config [no test files]
|
||||
? mtusi2026lab1/internal/store [no test files]
|
||||
ok mtusi2026lab1/student-tests 0.409s
|
||||
@@ -0,0 +1,2 @@
|
||||
python3 tests/smoke.py --base-url "http://localhost:8080"
|
||||
PASS: lab1 public API scenario; infrastructure and grading evidence remain separate.
|
||||
@@ -0,0 +1,20 @@
|
||||
go test ./student-tests/ -v -count=1 -timeout 120s
|
||||
=== RUN TestMalformedJSON
|
||||
2026/12/01 21:49:53 http method=POST path=/api/v1/users status=400 request_id=e731cc40-f3a1-4f66-be68-eb6e05a7e900 ms=0
|
||||
--- PASS: TestMalformedJSON (0.00s)
|
||||
=== RUN TestDuplicateUsername
|
||||
2026/12/01 21:49:53 http method=POST path=/api/v1/users status=409 request_id=72c7eecd-774e-4db1-b118-b2fd151d3a04 ms=0
|
||||
--- PASS: TestDuplicateUsername (0.00s)
|
||||
=== RUN TestEmptyMessage
|
||||
2026/12/01 21:49:53 http method=POST path=/api/v1/chats/7047a146-f9f3-452c-8aa9-e7bbb67b51cd/messages status=400 request_id=a4b8b306-1e64-49e5-a97f-dd6361adcf80 ms=0
|
||||
--- PASS: TestEmptyMessage (0.00s)
|
||||
=== RUN TestForeignChat
|
||||
2026/12/01 21:49:53 http method=GET path=/api/v1/chats/18f3643f-6e45-4097-abc2-b71ecf6a4f69 status=404 request_id=de8c3e0a-d4e8-40ad-9cd0-e023c61cd342 ms=0
|
||||
--- PASS: TestForeignChat (0.00s)
|
||||
=== RUN TestPaginationPages
|
||||
--- PASS: TestPaginationPages (0.00s)
|
||||
=== RUN TestConcurrentHundredMessages
|
||||
api_test.go:258: elapsed=7.819ms unique=100
|
||||
--- PASS: TestConcurrentHundredMessages (0.01s)
|
||||
PASS
|
||||
ok mtusi2026lab1/student-tests 0.487s
|
||||
Reference in New Issue
Block a user