solution
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"at_utc": "2026-11-02T14:04:52.232537+00:00",
|
||||
"platform": "Windows-10-10.0.19045-SP0",
|
||||
"cpu_count": 16,
|
||||
"python": "3.11.9",
|
||||
"duration": 20,
|
||||
"workload": "2 closed-loop clients, POST+GET; uncertain POST retried with same key/body"
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
$ docker version
|
||||
Client:
|
||||
Version: 26.1.4
|
||||
API version: 1.45
|
||||
Go version: go1.21.11
|
||||
Git commit: 5650f9b
|
||||
Built: Wed Jun 5 11:29:54 2024
|
||||
OS/Arch: windows/amd64
|
||||
Context: desktop-linux
|
||||
|
||||
Server: Docker Desktop 4.31.1 (153621)
|
||||
Engine:
|
||||
Version: 26.1.4
|
||||
API version: 1.45 (minimum version 1.24)
|
||||
Go version: go1.21.11
|
||||
Git commit: de5c9cf
|
||||
Built: Wed Jun 5 11:29:22 2024
|
||||
OS/Arch: linux/amd64
|
||||
Experimental: false
|
||||
containerd:
|
||||
Version: 1.6.33
|
||||
GitCommit: d2d58213f83a351ca8f528a95fbd145f5654e957
|
||||
runc:
|
||||
Version: 1.1.12
|
||||
GitCommit: v1.1.12-0-g51d5e94
|
||||
docker-init:
|
||||
Version: 0.19.0
|
||||
GitCommit: de40ad0
|
||||
|
||||
exit_code=0; elapsed_seconds=0.094
|
||||
@@ -0,0 +1,3 @@
|
||||
$ docker compose --env-file .env config --quiet
|
||||
|
||||
exit_code=0; elapsed_seconds=0.297
|
||||
@@ -0,0 +1,8 @@
|
||||
$ docker inspect --format {{.Name}} cpus={{.HostConfig.NanoCpus}} memory={{.HostConfig.Memory}} ports={{json .HostConfig.PortBindings}} b5f9cdc58cfa1e5ba32d7219909ca0b02f6984e2d69ec6090872f7c1aa3d40b8 3923c6b10754bdf24cf03312f2cdfc47d0c57b626e413c15c6bf99584795866a 765a7b20a31ea3ea8cfd024fe9d4a938c46f4d23d743e4db310b354d357014d8 5675a02e89826f64b25026269d5dc9177a7172ce4922722875c4d986e8423125 1b3ad58c1dd2bec01048e78af86e3c9812172df3c4189eab27352b11a950673d
|
||||
/mtusi-messenger-lab3-api-a-1 cpus=500000000 memory=268435456 ports={}
|
||||
/mtusi-messenger-lab3-api-b-1 cpus=500000000 memory=268435456 ports={}
|
||||
/mtusi-messenger-lab3-db-1 cpus=1000000000 memory=536870912 ports={}
|
||||
/mtusi-messenger-lab3-nginx-1 cpus=250000000 memory=100663296 ports={"8080/tcp":[{"HostIp":"127.0.0.1","HostPort":"8080"}]}
|
||||
/mtusi-messenger-lab3-redis-1 cpus=250000000 memory=134217728 ports={}
|
||||
|
||||
exit_code=0; elapsed_seconds=0.062
|
||||
@@ -0,0 +1,8 @@
|
||||
$ docker compose --env-file .env ps -q
|
||||
b5f9cdc58cfa1e5ba32d7219909ca0b02f6984e2d69ec6090872f7c1aa3d40b8
|
||||
3923c6b10754bdf24cf03312f2cdfc47d0c57b626e413c15c6bf99584795866a
|
||||
765a7b20a31ea3ea8cfd024fe9d4a938c46f4d23d743e4db310b354d357014d8
|
||||
5675a02e89826f64b25026269d5dc9177a7172ce4922722875c4d986e8423125
|
||||
1b3ad58c1dd2bec01048e78af86e3c9812172df3c4189eab27352b11a950673d
|
||||
|
||||
exit_code=0; elapsed_seconds=0.407
|
||||
@@ -0,0 +1,20 @@
|
||||
[
|
||||
{
|
||||
"service": "api-a",
|
||||
"container_id": "b5f9cdc58cfa1e5ba32d7219909ca0b02f6984e2d69ec6090872f7c1aa3d40b8",
|
||||
"pid": 494,
|
||||
"state": "running",
|
||||
"started_at": "2026-11-02T13:54:44.930052336Z",
|
||||
"status": 200,
|
||||
"instance_id": "a9caf7e09cdc4d63bf6c0a51f92d38f3"
|
||||
},
|
||||
{
|
||||
"service": "api-b",
|
||||
"container_id": "3923c6b10754bdf24cf03312f2cdfc47d0c57b626e413c15c6bf99584795866a",
|
||||
"pid": 496,
|
||||
"state": "running",
|
||||
"started_at": "2026-11-02T13:54:44.929946678Z",
|
||||
"status": 200,
|
||||
"instance_id": "f8a853f11dcd42be9d37227923a8b62a"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,4 @@
|
||||
$ C:\Users\ira\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\python.exe tests/smoke.py --base-url http://localhost:8080
|
||||
PASS: lab3 public API scenario; infrastructure and grading evidence remain separate.
|
||||
|
||||
exit_code=0; elapsed_seconds=67.235
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"parallel_requests": 12,
|
||||
"unique_message_ids": 1,
|
||||
"history_rows": 1,
|
||||
"instances": [
|
||||
"a9caf7e09cdc4d63bf6c0a51f92d38f3",
|
||||
"f8a853f11dcd42be9d37227923a8b62a"
|
||||
],
|
||||
"conflict_status": 409
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
{
|
||||
"mode": "stop",
|
||||
"service": "api-a",
|
||||
"target_instance": "a9caf7e09cdc4d63bf6c0a51f92d38f3",
|
||||
"observed_with_one_session": [
|
||||
"a9caf7e09cdc4d63bf6c0a51f92d38f3",
|
||||
"f8a853f11dcd42be9d37227923a8b62a"
|
||||
],
|
||||
"before": [
|
||||
{
|
||||
"service": "api-a",
|
||||
"container_id": "b5f9cdc58cfa1e5ba32d7219909ca0b02f6984e2d69ec6090872f7c1aa3d40b8",
|
||||
"pid": 494,
|
||||
"state": "running",
|
||||
"started_at": "2026-11-02T13:54:44.930052336Z",
|
||||
"status": 200,
|
||||
"instance_id": "a9caf7e09cdc4d63bf6c0a51f92d38f3"
|
||||
},
|
||||
{
|
||||
"service": "api-b",
|
||||
"container_id": "3923c6b10754bdf24cf03312f2cdfc47d0c57b626e413c15c6bf99584795866a",
|
||||
"pid": 496,
|
||||
"state": "running",
|
||||
"started_at": "2026-11-02T13:54:44.929946678Z",
|
||||
"status": 200,
|
||||
"instance_id": "f8a853f11dcd42be9d37227923a8b62a"
|
||||
}
|
||||
],
|
||||
"after_action": [
|
||||
{
|
||||
"service": "api-a",
|
||||
"container_id": "b5f9cdc58cfa1e5ba32d7219909ca0b02f6984e2d69ec6090872f7c1aa3d40b8",
|
||||
"pid": 0,
|
||||
"state": "exited",
|
||||
"started_at": "2026-11-02T13:54:44.930052336Z"
|
||||
},
|
||||
{
|
||||
"service": "api-b",
|
||||
"container_id": "3923c6b10754bdf24cf03312f2cdfc47d0c57b626e413c15c6bf99584795866a",
|
||||
"pid": 496,
|
||||
"state": "running",
|
||||
"started_at": "2026-11-02T13:54:44.929946678Z",
|
||||
"status": 200,
|
||||
"instance_id": "f8a853f11dcd42be9d37227923a8b62a"
|
||||
}
|
||||
],
|
||||
"action": "{\"stopped_service\": \"api-a\", \"instance_id\": \"a9caf7e09cdc4d63bf6c0a51f92d38f3\"}\n",
|
||||
"action_seconds": 3.594,
|
||||
"concurrency": 2,
|
||||
"total": {
|
||||
"elapsed_seconds": 24.609,
|
||||
"attempts": 24,
|
||||
"successes": 24,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 0.975,
|
||||
"successful_latency_ms": {
|
||||
"p50": 2031.0,
|
||||
"p95": 2047.0,
|
||||
"p99": 2078.0
|
||||
}
|
||||
},
|
||||
"during_and_after_action": {
|
||||
"elapsed_seconds": 23.609,
|
||||
"attempts": 22,
|
||||
"successes": 22,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 0.932,
|
||||
"successful_latency_ms": {
|
||||
"p50": 2031.0,
|
||||
"p95": 2047.0,
|
||||
"p99": 2078.0
|
||||
}
|
||||
},
|
||||
"confirmed_responses": 13,
|
||||
"history_messages": 13,
|
||||
"duplicates": 0,
|
||||
"existing_session_works": true,
|
||||
"first_write_after_action_seconds": 9.25,
|
||||
"write": {
|
||||
"elapsed_seconds": 24.609,
|
||||
"attempts": 12,
|
||||
"successes": 12,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 0.488,
|
||||
"successful_latency_ms": {
|
||||
"p50": 2031.0,
|
||||
"p95": 2078.0,
|
||||
"p99": 2078.0
|
||||
}
|
||||
},
|
||||
"first_read_after_action_seconds": 7.187,
|
||||
"read": {
|
||||
"elapsed_seconds": 24.609,
|
||||
"attempts": 12,
|
||||
"successes": 12,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 0.488,
|
||||
"successful_latency_ms": {
|
||||
"p50": 2031.0,
|
||||
"p95": 2047.0,
|
||||
"p99": 2047.0
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
{
|
||||
"mode": "stop",
|
||||
"service": "api-b",
|
||||
"target_instance": "f8a853f11dcd42be9d37227923a8b62a",
|
||||
"observed_with_one_session": [
|
||||
"71f43777fc8842999fb52b8b37b54209",
|
||||
"f8a853f11dcd42be9d37227923a8b62a"
|
||||
],
|
||||
"before": [
|
||||
{
|
||||
"service": "api-a",
|
||||
"container_id": "b5f9cdc58cfa1e5ba32d7219909ca0b02f6984e2d69ec6090872f7c1aa3d40b8",
|
||||
"pid": 33274,
|
||||
"state": "running",
|
||||
"started_at": "2026-11-02T14:08:05.363422472Z",
|
||||
"status": 200,
|
||||
"instance_id": "71f43777fc8842999fb52b8b37b54209"
|
||||
},
|
||||
{
|
||||
"service": "api-b",
|
||||
"container_id": "3923c6b10754bdf24cf03312f2cdfc47d0c57b626e413c15c6bf99584795866a",
|
||||
"pid": 496,
|
||||
"state": "running",
|
||||
"started_at": "2026-11-02T13:54:44.929946678Z",
|
||||
"status": 200,
|
||||
"instance_id": "f8a853f11dcd42be9d37227923a8b62a"
|
||||
}
|
||||
],
|
||||
"after_action": [
|
||||
{
|
||||
"service": "api-a",
|
||||
"container_id": "b5f9cdc58cfa1e5ba32d7219909ca0b02f6984e2d69ec6090872f7c1aa3d40b8",
|
||||
"pid": 33274,
|
||||
"state": "running",
|
||||
"started_at": "2026-11-02T14:08:05.363422472Z",
|
||||
"status": 200,
|
||||
"instance_id": "71f43777fc8842999fb52b8b37b54209"
|
||||
},
|
||||
{
|
||||
"service": "api-b",
|
||||
"container_id": "3923c6b10754bdf24cf03312f2cdfc47d0c57b626e413c15c6bf99584795866a",
|
||||
"pid": 0,
|
||||
"state": "exited",
|
||||
"started_at": "2026-11-02T13:54:44.929946678Z"
|
||||
}
|
||||
],
|
||||
"action": "{\"stopped_service\": \"api-b\", \"instance_id\": \"f8a853f11dcd42be9d37227923a8b62a\"}\n",
|
||||
"action_seconds": 3.922,
|
||||
"concurrency": 2,
|
||||
"total": {
|
||||
"elapsed_seconds": 24.672,
|
||||
"attempts": 24,
|
||||
"successes": 24,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 0.973,
|
||||
"successful_latency_ms": {
|
||||
"p50": 2032.0,
|
||||
"p95": 2094.0,
|
||||
"p99": 2094.0
|
||||
}
|
||||
},
|
||||
"during_and_after_action": {
|
||||
"elapsed_seconds": 23.672,
|
||||
"attempts": 22,
|
||||
"successes": 22,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 0.929,
|
||||
"successful_latency_ms": {
|
||||
"p50": 2032.0,
|
||||
"p95": 2094.0,
|
||||
"p99": 2094.0
|
||||
}
|
||||
},
|
||||
"confirmed_responses": 13,
|
||||
"history_messages": 13,
|
||||
"duplicates": 0,
|
||||
"existing_session_works": true,
|
||||
"first_write_after_action_seconds": 9.343,
|
||||
"write": {
|
||||
"elapsed_seconds": 24.672,
|
||||
"attempts": 12,
|
||||
"successes": 12,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 0.486,
|
||||
"successful_latency_ms": {
|
||||
"p50": 2032.0,
|
||||
"p95": 2063.0,
|
||||
"p99": 2063.0
|
||||
}
|
||||
},
|
||||
"first_read_after_action_seconds": 7.25,
|
||||
"read": {
|
||||
"elapsed_seconds": 24.672,
|
||||
"attempts": 12,
|
||||
"successes": 12,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 0.486,
|
||||
"successful_latency_ms": {
|
||||
"p50": 2032.0,
|
||||
"p95": 2094.0,
|
||||
"p99": 2094.0
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
$ C:\Users\ira\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\python.exe tests/resilience.py --mode failover --action-script scripts/stop-one.sh --base-url http://localhost:8080
|
||||
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
||||
{"observed_instances_before": 2, "successful_writes": 7, "failed_attempts": 0, "first_recovery_seconds": 6.343}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
|
||||
exit_code=0; elapsed_seconds=121.531
|
||||
@@ -0,0 +1,114 @@
|
||||
{
|
||||
"mode": "replace",
|
||||
"service": "api-a",
|
||||
"target_instance": "71f43777fc8842999fb52b8b37b54209",
|
||||
"observed_with_one_session": [
|
||||
"71f43777fc8842999fb52b8b37b54209",
|
||||
"7755536d105945f7bc8fb8a5f1afc7db"
|
||||
],
|
||||
"before": [
|
||||
{
|
||||
"service": "api-a",
|
||||
"container_id": "b5f9cdc58cfa1e5ba32d7219909ca0b02f6984e2d69ec6090872f7c1aa3d40b8",
|
||||
"pid": 33274,
|
||||
"state": "running",
|
||||
"started_at": "2026-11-02T14:08:05.363422472Z",
|
||||
"status": 200,
|
||||
"instance_id": "71f43777fc8842999fb52b8b37b54209"
|
||||
},
|
||||
{
|
||||
"service": "api-b",
|
||||
"container_id": "3923c6b10754bdf24cf03312f2cdfc47d0c57b626e413c15c6bf99584795866a",
|
||||
"pid": 40829,
|
||||
"state": "running",
|
||||
"started_at": "2026-11-02T14:11:10.686011176Z",
|
||||
"status": 200,
|
||||
"instance_id": "7755536d105945f7bc8fb8a5f1afc7db"
|
||||
}
|
||||
],
|
||||
"after_action": [
|
||||
{
|
||||
"service": "api-a",
|
||||
"container_id": "23e09768ad0c70567c705b69a9383a1ba2ce89c5c2ccf58117662168c763599c",
|
||||
"pid": 43148,
|
||||
"state": "running",
|
||||
"started_at": "2026-11-02T14:12:02.136399326Z",
|
||||
"status": 200,
|
||||
"instance_id": "1b8747dfda534a5a9ed92482ccb43f43"
|
||||
},
|
||||
{
|
||||
"service": "api-b",
|
||||
"container_id": "3923c6b10754bdf24cf03312f2cdfc47d0c57b626e413c15c6bf99584795866a",
|
||||
"pid": 40829,
|
||||
"state": "running",
|
||||
"started_at": "2026-11-02T14:11:10.686011176Z",
|
||||
"status": 200,
|
||||
"instance_id": "7755536d105945f7bc8fb8a5f1afc7db"
|
||||
}
|
||||
],
|
||||
"action": {
|
||||
"service": "api-a",
|
||||
"before": "71f43777fc8842999fb52b8b37b54209",
|
||||
"after": "1b8747dfda534a5a9ed92482ccb43f43"
|
||||
},
|
||||
"action_seconds": 20.032,
|
||||
"concurrency": 2,
|
||||
"total": {
|
||||
"elapsed_seconds": 28.921,
|
||||
"attempts": 28,
|
||||
"successes": 28,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 0.968,
|
||||
"successful_latency_ms": {
|
||||
"p50": 2032.0,
|
||||
"p95": 2110.0,
|
||||
"p99": 2141.0
|
||||
}
|
||||
},
|
||||
"during_and_after_action": {
|
||||
"elapsed_seconds": 27.875,
|
||||
"attempts": 26,
|
||||
"successes": 26,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 0.933,
|
||||
"successful_latency_ms": {
|
||||
"p50": 2032.0,
|
||||
"p95": 2078.0,
|
||||
"p99": 2141.0
|
||||
}
|
||||
},
|
||||
"confirmed_responses": 15,
|
||||
"history_messages": 15,
|
||||
"duplicates": 0,
|
||||
"existing_session_works": true,
|
||||
"first_write_after_action_seconds": 25.75,
|
||||
"write": {
|
||||
"elapsed_seconds": 28.921,
|
||||
"attempts": 14,
|
||||
"successes": 14,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 0.484,
|
||||
"successful_latency_ms": {
|
||||
"p50": 2062.0,
|
||||
"p95": 2141.0,
|
||||
"p99": 2141.0
|
||||
}
|
||||
},
|
||||
"first_read_after_action_seconds": 23.657,
|
||||
"read": {
|
||||
"elapsed_seconds": 28.921,
|
||||
"attempts": 14,
|
||||
"successes": 14,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 0.484,
|
||||
"successful_latency_ms": {
|
||||
"p50": 2031.0,
|
||||
"p95": 2047.0,
|
||||
"p99": 2047.0
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
{
|
||||
"mode": "replace",
|
||||
"service": "api-b",
|
||||
"target_instance": "7755536d105945f7bc8fb8a5f1afc7db",
|
||||
"observed_with_one_session": [
|
||||
"1b8747dfda534a5a9ed92482ccb43f43",
|
||||
"7755536d105945f7bc8fb8a5f1afc7db"
|
||||
],
|
||||
"before": [
|
||||
{
|
||||
"service": "api-a",
|
||||
"container_id": "23e09768ad0c70567c705b69a9383a1ba2ce89c5c2ccf58117662168c763599c",
|
||||
"pid": 43148,
|
||||
"state": "running",
|
||||
"started_at": "2026-11-02T14:12:02.136399326Z",
|
||||
"status": 200,
|
||||
"instance_id": "1b8747dfda534a5a9ed92482ccb43f43"
|
||||
},
|
||||
{
|
||||
"service": "api-b",
|
||||
"container_id": "3923c6b10754bdf24cf03312f2cdfc47d0c57b626e413c15c6bf99584795866a",
|
||||
"pid": 40829,
|
||||
"state": "running",
|
||||
"started_at": "2026-11-02T14:11:10.686011176Z",
|
||||
"status": 200,
|
||||
"instance_id": "7755536d105945f7bc8fb8a5f1afc7db"
|
||||
}
|
||||
],
|
||||
"after_action": [
|
||||
{
|
||||
"service": "api-a",
|
||||
"container_id": "23e09768ad0c70567c705b69a9383a1ba2ce89c5c2ccf58117662168c763599c",
|
||||
"pid": 43148,
|
||||
"state": "running",
|
||||
"started_at": "2026-11-02T14:12:02.136399326Z",
|
||||
"status": 200,
|
||||
"instance_id": "1b8747dfda534a5a9ed92482ccb43f43"
|
||||
},
|
||||
{
|
||||
"service": "api-b",
|
||||
"container_id": "51a88aae9d0221d84f2483e06469327ee9fd457c4a95f50557907d930f9e64ed",
|
||||
"pid": 46165,
|
||||
"state": "running",
|
||||
"started_at": "2026-11-02T14:13:06.793037685Z",
|
||||
"status": 200,
|
||||
"instance_id": "acec6d43ecdd4b76a240c85f334d3152"
|
||||
}
|
||||
],
|
||||
"action": {
|
||||
"service": "api-b",
|
||||
"before": "7755536d105945f7bc8fb8a5f1afc7db",
|
||||
"after": "acec6d43ecdd4b76a240c85f334d3152"
|
||||
},
|
||||
"action_seconds": 18.875,
|
||||
"concurrency": 2,
|
||||
"total": {
|
||||
"elapsed_seconds": 28.797,
|
||||
"attempts": 28,
|
||||
"successes": 28,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 0.972,
|
||||
"successful_latency_ms": {
|
||||
"p50": 2032.0,
|
||||
"p95": 2078.0,
|
||||
"p99": 2079.0
|
||||
}
|
||||
},
|
||||
"during_and_after_action": {
|
||||
"elapsed_seconds": 27.797,
|
||||
"attempts": 26,
|
||||
"successes": 26,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 0.935,
|
||||
"successful_latency_ms": {
|
||||
"p50": 2032.0,
|
||||
"p95": 2078.0,
|
||||
"p99": 2079.0
|
||||
}
|
||||
},
|
||||
"confirmed_responses": 15,
|
||||
"history_messages": 15,
|
||||
"duplicates": 0,
|
||||
"existing_session_works": true,
|
||||
"first_write_after_action_seconds": 21.578,
|
||||
"write": {
|
||||
"elapsed_seconds": 28.797,
|
||||
"attempts": 14,
|
||||
"successes": 14,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 0.486,
|
||||
"successful_latency_ms": {
|
||||
"p50": 2047.0,
|
||||
"p95": 2078.0,
|
||||
"p99": 2078.0
|
||||
}
|
||||
},
|
||||
"first_read_after_action_seconds": 23.594,
|
||||
"read": {
|
||||
"elapsed_seconds": 28.797,
|
||||
"attempts": 14,
|
||||
"successes": 14,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 0.486,
|
||||
"successful_latency_ms": {
|
||||
"p50": 2031.0,
|
||||
"p95": 2079.0,
|
||||
"p99": 2079.0
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
$ C:\Users\ira\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\python.exe tests/resilience.py --mode persistence --action-script scripts/restart.sh --base-url http://localhost:8080
|
||||
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
|
||||
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
|
||||
exit_code=0; elapsed_seconds=43.297
|
||||
@@ -0,0 +1,20 @@
|
||||
[
|
||||
{
|
||||
"service": "api-a",
|
||||
"container_id": "ef1e096f1c30593e0d8e9ebeb467a21c997580d835473c76142127d2d402b235",
|
||||
"pid": 48570,
|
||||
"state": "running",
|
||||
"started_at": "2026-11-02T14:13:58.63201658Z",
|
||||
"status": 200,
|
||||
"instance_id": "1b38655b9a21447494973eb99d5ea039"
|
||||
},
|
||||
{
|
||||
"service": "api-b",
|
||||
"container_id": "4cccbf699f55df2a5e9fd6e19aa897796654a47cdac2ff372565fa6c2a4677e0",
|
||||
"pid": 48587,
|
||||
"state": "running",
|
||||
"started_at": "2026-11-02T14:13:58.715403308Z",
|
||||
"status": 200,
|
||||
"instance_id": "128e6b095f444dffa33214cd3cd33184"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,47 @@
|
||||
$ docker compose --env-file .env exec -T nginx nginx -T -c /opt/lb/nginx.conf
|
||||
# configuration file /opt/lb/nginx.conf:
|
||||
worker_processes 1;
|
||||
pid /tmp/nginx.pid;
|
||||
error_log /dev/stderr warn;
|
||||
worker_shutdown_timeout 5s;
|
||||
events { worker_connections 1024; }
|
||||
http {
|
||||
log_format upstream '$request_method $uri status=$status upstream=$upstream_addr upstream_status=$upstream_status time=$request_time';
|
||||
access_log /dev/stdout upstream;
|
||||
resolver 127.0.0.11 valid=1s ipv6=off;
|
||||
resolver_timeout 1s;
|
||||
include /tmp/backends.conf;
|
||||
server {
|
||||
listen 8080;
|
||||
server_tokens off;
|
||||
client_max_body_size 256k;
|
||||
client_header_timeout 5s;
|
||||
client_body_timeout 5s;
|
||||
keepalive_timeout 2s;
|
||||
location / {
|
||||
proxy_pass http://api_backend;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection "";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_connect_timeout 1s;
|
||||
proxy_read_timeout 8s;
|
||||
proxy_send_timeout 8s;
|
||||
proxy_next_upstream error timeout http_502 http_503 http_504;
|
||||
proxy_next_upstream_tries 2;
|
||||
proxy_next_upstream_timeout 9s;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# configuration file /tmp/backends.conf:
|
||||
upstream api_backend {
|
||||
zone api_backend 64k;
|
||||
server api-a:8080 resolve max_fails=1 fail_timeout=2s;
|
||||
server api-b:8080 resolve max_fails=1 fail_timeout=2s;
|
||||
}
|
||||
|
||||
nginx: the configuration file /opt/lb/nginx.conf syntax is ok
|
||||
nginx: configuration file /opt/lb/nginx.conf test is successful
|
||||
|
||||
exit_code=0; elapsed_seconds=0.375
|
||||
@@ -0,0 +1,303 @@
|
||||
$ docker compose --env-file .env --profile test run --rm --build tests
|
||||
#0 building with "desktop-linux" instance using docker driver
|
||||
|
||||
#1 [tests internal] load build definition from Dockerfile
|
||||
#1 transferring dockerfile: 955B 0.0s done
|
||||
#1 DONE 0.0s
|
||||
|
||||
#2 [tests internal] load metadata for docker.io/library/python:3.12.8-slim-bookworm
|
||||
#2 ...
|
||||
|
||||
#3 [tests auth] library/python:pull token for registry-1.docker.io
|
||||
#3 DONE 0.0s
|
||||
|
||||
#2 [tests internal] load metadata for docker.io/library/python:3.12.8-slim-bookworm
|
||||
#2 DONE 1.7s
|
||||
|
||||
#4 [tests internal] load .dockerignore
|
||||
#4 transferring context: 196B done
|
||||
#4 DONE 0.0s
|
||||
|
||||
#5 [tests base 1/6] FROM docker.io/library/python:3.12.8-slim-bookworm@sha256:2199a62885a12290dc9c5be3ca0681d367576ab7bf037da120e564723292a2f0
|
||||
#5 DONE 0.0s
|
||||
|
||||
#6 [tests internal] load build context
|
||||
#6 transferring context: 87.79kB 0.0s done
|
||||
#6 DONE 0.0s
|
||||
|
||||
#7 [tests base 4/6] COPY requirements.txt ./
|
||||
#7 CACHED
|
||||
|
||||
#8 [tests test 2/5] RUN pip install -r requirements-test.txt
|
||||
#8 CACHED
|
||||
|
||||
#9 [tests test 1/5] COPY requirements-test.txt ./
|
||||
#9 CACHED
|
||||
|
||||
#10 [tests test 4/5] COPY student-tests ./student-tests
|
||||
#10 CACHED
|
||||
|
||||
#11 [tests test 3/5] COPY pytest.ini ./
|
||||
#11 CACHED
|
||||
|
||||
#12 [tests base 3/6] WORKDIR /srv
|
||||
#12 CACHED
|
||||
|
||||
#13 [tests base 6/6] COPY app ./app
|
||||
#13 CACHED
|
||||
|
||||
#14 [tests base 2/6] RUN groupadd --system --gid 10001 app && useradd --system --uid 10001 --gid app --no-create-home --shell /usr/sbin/nologin app
|
||||
#14 CACHED
|
||||
|
||||
#15 [tests base 5/6] RUN pip install -r requirements.txt
|
||||
#15 CACHED
|
||||
|
||||
#16 [tests test 5/5] COPY unit-tests ./unit-tests
|
||||
#16 CACHED
|
||||
|
||||
#17 [tests] exporting to image
|
||||
#17 exporting layers done
|
||||
#17 writing image sha256:c4492757aa5070ae7b09009339bfa52d41b2ef1a39beb1d7dde355a0c2fa257e done
|
||||
#17 naming to docker.io/library/mtusi-messenger:lab3-test done
|
||||
#17 DONE 0.0s
|
||||
============================= test session starts ==============================
|
||||
collecting ... collected 226 items
|
||||
|
||||
student-tests/test_auth.py::test_register_returns_user_without_secrets PASSED [ 0%]
|
||||
student-tests/test_auth.py::test_register_password_rules[None] PASSED [ 0%]
|
||||
student-tests/test_auth.py::test_register_password_rules[] PASSED [ 1%]
|
||||
student-tests/test_auth.py::test_register_password_rules[short] PASSED [ 1%]
|
||||
student-tests/test_auth.py::test_register_password_rules[aaaaaaaaaaa] PASSED [ 2%]
|
||||
student-tests/test_auth.py::test_register_password_rules[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] PASSED [ 2%]
|
||||
student-tests/test_auth.py::test_register_password_rules[123456789012] PASSED [ 3%]
|
||||
student-tests/test_auth.py::test_register_password_rules[\u043f\u0430\u0440\u043e\u043b\u044c] PASSED [ 3%]
|
||||
student-tests/test_auth.py::test_register_password_border_lengths PASSED [ 3%]
|
||||
student-tests/test_auth.py::test_login_success_shape PASSED [ 4%]
|
||||
student-tests/test_auth.py::test_each_login_gives_new_token PASSED [ 4%]
|
||||
student-tests/test_auth.py::test_wrong_password_and_unknown_user_look_the_same PASSED [ 5%]
|
||||
student-tests/test_auth.py::test_malformed_basic_is_401[Basic] PASSED [ 5%]
|
||||
student-tests/test_auth.py::test_malformed_basic_is_401[Basic !!!not-base64!!!] PASSED [ 6%]
|
||||
student-tests/test_auth.py::test_malformed_basic_is_401[Basic bm9jb2xvbg==] PASSED [ 6%]
|
||||
student-tests/test_auth.py::test_malformed_basic_is_401[Basic 0LjQvNGPOnBhc3N3b3JkLTEyMzQ1Ng==] PASSED [ 7%]
|
||||
student-tests/test_auth.py::test_malformed_basic_is_401[Basic dXNlcjr//i1iYWQtdXRmOA==] PASSED [ 7%]
|
||||
student-tests/test_auth.py::test_malformed_basic_is_401[Bearer abc] PASSED [ 7%]
|
||||
student-tests/test_auth.py::test_malformed_basic_is_401[] PASSED [ 8%]
|
||||
student-tests/test_auth.py::test_login_without_header_is_401 PASSED [ 8%]
|
||||
student-tests/test_auth.py::test_password_with_colon_and_unicode_works PASSED [ 9%]
|
||||
student-tests/test_auth.py::test_bearer_token_gives_access PASSED [ 9%]
|
||||
student-tests/test_auth.py::test_business_endpoint_rejects_basic PASSED [ 10%]
|
||||
student-tests/test_auth.py::test_bad_or_unknown_bearer_is_401[] PASSED [ 10%]
|
||||
student-tests/test_auth.py::test_bad_or_unknown_bearer_is_401[Bearer] PASSED [ 11%]
|
||||
student-tests/test_auth.py::test_bad_or_unknown_bearer_is_401[Bearer short] PASSED [ 11%]
|
||||
student-tests/test_auth.py::test_bad_or_unknown_bearer_is_401[Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx] PASSED [ 11%]
|
||||
student-tests/test_auth.py::test_bad_or_unknown_bearer_is_401[Token abc] PASSED [ 12%]
|
||||
student-tests/test_auth.py::test_bad_or_unknown_bearer_is_401[bearer] PASSED [ 12%]
|
||||
student-tests/test_auth.py::test_x_user_id_alone_gives_no_access PASSED [ 13%]
|
||||
student-tests/test_auth.py::test_x_user_id_does_not_change_owner_of_session PASSED [ 13%]
|
||||
student-tests/test_auth.py::test_logout_revokes_token_and_repeat_is_401 PASSED [ 14%]
|
||||
student-tests/test_auth.py::test_logout_without_token_is_401 PASSED [ 14%]
|
||||
student-tests/test_auth.py::test_logout_revokes_only_current_session PASSED [ 15%]
|
||||
student-tests/test_auth.py::test_session_lives_longer_than_300_seconds PASSED [ 15%]
|
||||
student-tests/test_cache.py::test_user_profile_is_served_from_cache_with_bounded_ttl PASSED [ 15%]
|
||||
student-tests/test_cache.py::test_cache_never_stores_raw_tokens_or_passwords PASSED [ 16%]
|
||||
student-tests/test_cache.py::test_logout_revokes_cached_session PASSED [ 16%]
|
||||
student-tests/test_cache.py::test_late_cache_fill_cannot_resurrect_revoked_session PASSED [ 17%]
|
||||
student-tests/test_cache.py::test_flushed_cache_loses_nothing PASSED [ 17%]
|
||||
student-tests/test_cache.py::test_cache_does_not_extend_short_session PASSED [ 18%]
|
||||
student-tests/test_cache.py::test_staleness_after_out_of_band_delete_is_bounded_by_cache_ttl PASSED [ 18%]
|
||||
student-tests/test_cache.py::test_redis_down_requests_bypass_cache_and_stay_fast PASSED [ 19%]
|
||||
student-tests/test_cache.py::test_redis_down_never_trusts_anonymous_or_unknown_tokens PASSED [ 19%]
|
||||
student-tests/test_cache.py::test_revocation_lost_while_redis_down_is_flushed_on_recovery PASSED [ 19%]
|
||||
student-tests/test_cache.py::test_without_cache_url_cache_is_off PASSED [ 20%]
|
||||
student-tests/test_cache.py::test_lost_revocation_survives_api_restart[False] PASSED [ 20%]
|
||||
student-tests/test_cache.py::test_lost_revocation_survives_api_restart[True] PASSED [ 21%]
|
||||
student-tests/test_cache.py::test_cached_session_deleted_in_database_is_rejected_immediately PASSED [ 21%]
|
||||
student-tests/test_concurrency.py::test_100_messages_from_10_clients_in_parallel PASSED [ 22%]
|
||||
student-tests/test_concurrency.py::test_parallel_chat_creation_and_reading PASSED [ 22%]
|
||||
student-tests/test_contract_basics.py::test_health_endpoints PASSED [ 23%]
|
||||
student-tests/test_contract_basics.py::test_every_response_has_unique_request_id PASSED [ 23%]
|
||||
student-tests/test_contract_basics.py::test_unknown_path_is_404_in_common_format PASSED [ 23%]
|
||||
student-tests/test_contract_basics.py::test_trailing_slash_is_not_redirected PASSED [ 24%]
|
||||
student-tests/test_contract_basics.py::test_wrong_method_is_405_in_common_format PASSED [ 24%]
|
||||
student-tests/test_contract_basics.py::test_two_users_one_chat_two_messages PASSED [ 25%]
|
||||
student-tests/test_contract_basics.py::test_chat_response_shape PASSED [ 25%]
|
||||
student-tests/test_contract_basics.py::test_unexpected_exception_gives_500_without_details PASSED [ 26%]
|
||||
student-tests/test_contract_basics.py::test_logs_have_requests_but_no_secrets PASSED [ 26%]
|
||||
student-tests/test_database.py::test_password_is_stored_as_scrypt_hash_not_plaintext PASSED [ 26%]
|
||||
student-tests/test_database.py::test_same_password_gives_different_hashes PASSED [ 27%]
|
||||
student-tests/test_database.py::test_session_table_keeps_token_hash_not_token PASSED [ 27%]
|
||||
student-tests/test_database.py::test_message_is_really_in_the_database PASSED [ 28%]
|
||||
student-tests/test_database.py::test_migrations_can_run_again_without_duplicating_anything PASSED [ 28%]
|
||||
student-tests/test_database.py::test_expected_tables_and_indexes_exist PASSED [ 29%]
|
||||
student-tests/test_database.py::test_primary_and_foreign_keys_are_declared PASSED [ 29%]
|
||||
student-tests/test_database.py::test_database_itself_rejects_bad_rows PASSED [ 30%]
|
||||
student-tests/test_database.py::test_chat_creation_is_atomic PASSED [ 30%]
|
||||
student-tests/test_database.py::test_successful_chat_has_all_members_in_database PASSED [ 30%]
|
||||
student-tests/test_db_failure.py::test_database_down_gives_503_and_never_trusts_anyone PASSED [ 31%]
|
||||
student-tests/test_db_failure.py::test_database_down_with_cache_up_still_needs_database_for_data PASSED [ 31%]
|
||||
student-tests/test_duplicate_username.py::test_second_registration_with_same_username_is_409 PASSED [ 32%]
|
||||
student-tests/test_duplicate_username.py::test_duplicate_does_not_replace_original_user PASSED [ 32%]
|
||||
student-tests/test_duplicate_username.py::test_username_is_case_sensitive_lowercase_only PASSED [ 33%]
|
||||
student-tests/test_duplicate_username.py::test_parallel_registration_of_same_username_creates_exactly_one PASSED [ 33%]
|
||||
student-tests/test_empty_message.py::test_blank_text_is_rejected[] PASSED [ 34%]
|
||||
student-tests/test_empty_message.py::test_blank_text_is_rejected[ ] PASSED [ 34%]
|
||||
student-tests/test_empty_message.py::test_blank_text_is_rejected[ ] PASSED [ 34%]
|
||||
student-tests/test_empty_message.py::test_blank_text_is_rejected[\n] PASSED [ 35%]
|
||||
student-tests/test_empty_message.py::test_blank_text_is_rejected[\t \n] PASSED [ 35%]
|
||||
student-tests/test_empty_message.py::test_blank_text_is_rejected[\xa0] PASSED [ 36%]
|
||||
student-tests/test_empty_message.py::test_blank_text_is_rejected[\u2003] PASSED [ 36%]
|
||||
student-tests/test_empty_message.py::test_missing_or_wrong_type_text_is_rejected[body0] PASSED [ 37%]
|
||||
student-tests/test_empty_message.py::test_missing_or_wrong_type_text_is_rejected[body1] PASSED [ 37%]
|
||||
student-tests/test_empty_message.py::test_missing_or_wrong_type_text_is_rejected[body2] PASSED [ 38%]
|
||||
student-tests/test_empty_message.py::test_missing_or_wrong_type_text_is_rejected[body3] PASSED [ 38%]
|
||||
student-tests/test_empty_message.py::test_missing_or_wrong_type_text_is_rejected[body4] PASSED [ 38%]
|
||||
student-tests/test_empty_message.py::test_text_length_is_counted_in_characters PASSED [ 39%]
|
||||
student-tests/test_empty_message.py::test_nul_character_is_400_not_500 PASSED [ 39%]
|
||||
student-tests/test_empty_message.py::test_unicode_survives_the_database PASSED [ 40%]
|
||||
student-tests/test_empty_message.py::test_message_has_correct_fields PASSED [ 40%]
|
||||
student-tests/test_explain.py::test_history_page_uses_index_without_full_scan[0] PASSED [ 41%]
|
||||
student-tests/test_explain.py::test_history_page_uses_index_without_full_scan[9000] PASSED [ 41%]
|
||||
student-tests/test_foreign_chat.py::test_outsider_cannot_read_chat PASSED [ 42%]
|
||||
student-tests/test_foreign_chat.py::test_outsider_cannot_read_history PASSED [ 42%]
|
||||
student-tests/test_foreign_chat.py::test_outsider_cannot_write PASSED [ 42%]
|
||||
student-tests/test_foreign_chat.py::test_outsider_gets_404_even_with_bad_body PASSED [ 43%]
|
||||
student-tests/test_foreign_chat.py::test_unknown_chat_looks_the_same_as_foreign PASSED [ 43%]
|
||||
student-tests/test_foreign_chat.py::test_chat_list_shows_only_own_chats PASSED [ 44%]
|
||||
student-tests/test_foreign_chat.py::test_bad_chat_id_is_400 PASSED [ 44%]
|
||||
student-tests/test_foreign_chat.py::test_no_token_is_401_everywhere PASSED [ 45%]
|
||||
student-tests/test_foreign_chat.py::test_401_comes_before_404 PASSED [ 45%]
|
||||
student-tests/test_foreign_chat.py::test_member_can_read_and_write PASSED [ 46%]
|
||||
student-tests/test_idempotency.py::test_key_is_required_and_validated[None] PASSED [ 46%]
|
||||
student-tests/test_idempotency.py::test_key_is_required_and_validated[] PASSED [ 46%]
|
||||
student-tests/test_idempotency.py::test_key_is_required_and_validated[a b] PASSED [ 47%]
|
||||
student-tests/test_idempotency.py::test_key_is_required_and_validated[a?b] PASSED [ 47%]
|
||||
student-tests/test_idempotency.py::test_key_is_required_and_validated[xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx] PASSED [ 48%]
|
||||
student-tests/test_idempotency.py::test_key_is_required_and_validated[a,b] PASSED [ 48%]
|
||||
student-tests/test_idempotency.py::test_key_is_required_and_validated[a/b] PASSED [ 49%]
|
||||
student-tests/test_idempotency.py::test_duplicate_headers_are_invalid PASSED [ 49%]
|
||||
student-tests/test_idempotency.py::test_replay_and_conflict_preserve_original_result PASSED [ 50%]
|
||||
student-tests/test_idempotency.py::test_parallel_same_key_across_two_applications PASSED [ 50%]
|
||||
student-tests/test_idempotency.py::test_key_scope_includes_user_and_chat PASSED [ 50%]
|
||||
student-tests/test_idempotency.py::test_expired_result_allows_new_message PASSED [ 51%]
|
||||
student-tests/test_idempotency.py::test_failure_between_message_and_result_rolls_back PASSED [ 51%]
|
||||
student-tests/test_idempotency.py::test_committed_but_lost_response_is_safe_to_retry PASSED [ 52%]
|
||||
student-tests/test_idempotency.py::test_replay_rechecks_session_and_chat_access PASSED [ 52%]
|
||||
student-tests/test_invalid_json.py::test_registration_rejects_broken_json[{] PASSED [ 53%]
|
||||
student-tests/test_invalid_json.py::test_registration_rejects_broken_json[not json at all] PASSED [ 53%]
|
||||
student-tests/test_invalid_json.py::test_registration_rejects_broken_json[] PASSED [ 53%]
|
||||
student-tests/test_invalid_json.py::test_registration_rejects_broken_json[{"username": "abc",}] PASSED [ 54%]
|
||||
student-tests/test_invalid_json.py::test_registration_rejects_broken_json[\xff\xfe\x00] PASSED [ 54%]
|
||||
student-tests/test_invalid_json.py::test_registration_rejects_broken_json[{"username": NaN}] PASSED [ 55%]
|
||||
student-tests/test_invalid_json.py::test_registration_rejects_broken_json[["username"]] PASSED [ 55%]
|
||||
student-tests/test_invalid_json.py::test_registration_rejects_broken_json["text"] PASSED [ 56%]
|
||||
student-tests/test_invalid_json.py::test_registration_rejects_broken_json[null] PASSED [ 56%]
|
||||
student-tests/test_invalid_json.py::test_registration_rejects_bad_fields[changes0] PASSED [ 57%]
|
||||
student-tests/test_invalid_json.py::test_registration_rejects_bad_fields[changes1] PASSED [ 57%]
|
||||
student-tests/test_invalid_json.py::test_registration_rejects_bad_fields[changes2] PASSED [ 57%]
|
||||
student-tests/test_invalid_json.py::test_registration_rejects_bad_fields[changes3] PASSED [ 58%]
|
||||
student-tests/test_invalid_json.py::test_registration_rejects_bad_fields[changes4] PASSED [ 58%]
|
||||
student-tests/test_invalid_json.py::test_registration_rejects_bad_fields[changes5] PASSED [ 59%]
|
||||
student-tests/test_invalid_json.py::test_registration_rejects_bad_fields[changes6] PASSED [ 59%]
|
||||
student-tests/test_invalid_json.py::test_registration_rejects_bad_fields[changes7] PASSED [ 60%]
|
||||
student-tests/test_invalid_json.py::test_registration_rejects_bad_fields[changes8] PASSED [ 60%]
|
||||
student-tests/test_invalid_json.py::test_registration_rejects_bad_fields[changes9] PASSED [ 61%]
|
||||
student-tests/test_invalid_json.py::test_registration_rejects_bad_fields[changes10] PASSED [ 61%]
|
||||
student-tests/test_invalid_json.py::test_registration_rejects_bad_fields[changes11] PASSED [ 61%]
|
||||
student-tests/test_invalid_json.py::test_registration_rejects_bad_fields[changes12] PASSED [ 62%]
|
||||
student-tests/test_invalid_json.py::test_registration_rejects_bad_fields[changes13] PASSED [ 62%]
|
||||
student-tests/test_invalid_json.py::test_registration_rejects_bad_fields[changes14] PASSED [ 63%]
|
||||
student-tests/test_invalid_json.py::test_registration_rejects_bad_fields[changes15] PASSED [ 63%]
|
||||
student-tests/test_invalid_json.py::test_registration_rejects_bad_fields[changes16] PASSED [ 64%]
|
||||
student-tests/test_invalid_json.py::test_border_values_are_accepted PASSED [ 64%]
|
||||
student-tests/test_invalid_json.py::test_lone_surrogate_is_400_not_500 PASSED [ 65%]
|
||||
student-tests/test_invalid_json.py::test_wrong_or_missing_content_type_is_415 PASSED [ 65%]
|
||||
student-tests/test_invalid_json.py::test_huge_body_is_413 PASSED [ 65%]
|
||||
student-tests/test_invalid_json.py::test_broken_json_in_message_and_chat PASSED [ 66%]
|
||||
student-tests/test_invalid_json.py::test_sender_id_in_message_is_rejected PASSED [ 66%]
|
||||
student-tests/test_invalid_json.py::test_chat_body_validation PASSED [ 67%]
|
||||
student-tests/test_pagination.py::test_walk_25_messages_by_7 PASSED [ 67%]
|
||||
student-tests/test_pagination.py::test_exact_multiple_has_no_empty_extra_page PASSED [ 68%]
|
||||
student-tests/test_pagination.py::test_limit_one_walks_everything PASSED [ 68%]
|
||||
student-tests/test_pagination.py::test_default_limit_is_50_and_max_is_100 PASSED [ 69%]
|
||||
student-tests/test_pagination.py::test_empty_history PASSED [ 69%]
|
||||
student-tests/test_pagination.py::test_limit_can_change_between_pages PASSED [ 69%]
|
||||
student-tests/test_pagination.py::test_messages_sent_during_walk_appear_at_the_end PASSED [ 70%]
|
||||
student-tests/test_pagination.py::test_created_at_is_increasing_and_utc PASSED [ 70%]
|
||||
student-tests/test_pagination.py::test_bad_limit_values PASSED [ 71%]
|
||||
student-tests/test_pagination.py::test_garbage_cursor_is_400 PASSED [ 71%]
|
||||
student-tests/test_pagination.py::test_cursor_from_another_chat_is_400 PASSED [ 72%]
|
||||
student-tests/test_pagination.py::test_chat_list_pagination PASSED [ 72%]
|
||||
student-tests/test_pagination.py::test_chat_list_cursor_cannot_be_used_for_messages PASSED [ 73%]
|
||||
student-tests/test_pagination.py::test_invalid_cursor_timestamp_is_400[messages--1] PASSED [ 73%]
|
||||
student-tests/test_pagination.py::test_invalid_cursor_timestamp_is_400[messages-1000000000000000000000000000000] PASSED [ 73%]
|
||||
student-tests/test_pagination.py::test_invalid_cursor_timestamp_is_400[messages-253402300800000000] PASSED [ 74%]
|
||||
student-tests/test_pagination.py::test_invalid_cursor_timestamp_is_400[messages-True] PASSED [ 74%]
|
||||
student-tests/test_pagination.py::test_invalid_cursor_timestamp_is_400[messages-1.5] PASSED [ 75%]
|
||||
student-tests/test_pagination.py::test_invalid_cursor_timestamp_is_400[messages-1] PASSED [ 75%]
|
||||
student-tests/test_pagination.py::test_invalid_cursor_timestamp_is_400[messages-None] PASSED [ 76%]
|
||||
student-tests/test_pagination.py::test_invalid_cursor_timestamp_is_400[chats--1] PASSED [ 76%]
|
||||
student-tests/test_pagination.py::test_invalid_cursor_timestamp_is_400[chats-1000000000000000000000000000000] PASSED [ 76%]
|
||||
student-tests/test_pagination.py::test_invalid_cursor_timestamp_is_400[chats-253402300800000000] PASSED [ 77%]
|
||||
student-tests/test_pagination.py::test_invalid_cursor_timestamp_is_400[chats-True] PASSED [ 77%]
|
||||
student-tests/test_pagination.py::test_invalid_cursor_timestamp_is_400[chats-1.5] PASSED [ 78%]
|
||||
student-tests/test_pagination.py::test_invalid_cursor_timestamp_is_400[chats-1] PASSED [ 78%]
|
||||
student-tests/test_pagination.py::test_invalid_cursor_timestamp_is_400[chats-None] PASSED [ 79%]
|
||||
student-tests/test_pagination.py::test_cursor_timestamp_boundaries_are_valid[messages-0] PASSED [ 79%]
|
||||
student-tests/test_pagination.py::test_cursor_timestamp_boundaries_are_valid[messages-253402300799999999] PASSED [ 80%]
|
||||
student-tests/test_pagination.py::test_cursor_timestamp_boundaries_are_valid[chats-0] PASSED [ 80%]
|
||||
student-tests/test_pagination.py::test_cursor_timestamp_boundaries_are_valid[chats-253402300799999999] PASSED [ 80%]
|
||||
student-tests/test_session_expiry.py::test_session_expires_after_ttl PASSED [ 81%]
|
||||
student-tests/test_session_expiry.py::test_expired_sessions_are_cleaned_on_next_login PASSED [ 81%]
|
||||
student-tests/test_session_expiry.py::test_short_ttl_from_environment_variable PASSED [ 82%]
|
||||
student-tests/test_transactions.py::test_failure_after_chat_insert_rolls_back_whole_operation PASSED [ 82%]
|
||||
student-tests/test_transactions.py::test_pool_is_bounded_by_settings PASSED [ 83%]
|
||||
student-tests/test_transactions.py::test_exhausted_pool_gives_fast_503 PASSED [ 83%]
|
||||
unit-tests/test_message_transaction.py::test_conflicting_replay_rolls_back_without_commit PASSED [ 84%]
|
||||
unit-tests/test_message_transaction.py::test_result_insert_failure_never_commits_message PASSED [ 84%]
|
||||
unit-tests/test_message_transaction.py::test_replay_returns_original_message_and_releases_transaction PASSED [ 84%]
|
||||
unit-tests/test_message_transaction.py::test_failed_commit_rolls_back_and_propagates_error PASSED [ 85%]
|
||||
unit-tests/test_mr_regressions.py::test_stale_positive_cache_never_authorizes_revoked_token[/api/v1/users/me-GET] PASSED [ 85%]
|
||||
unit-tests/test_mr_regressions.py::test_stale_positive_cache_never_authorizes_revoked_token[/api/v1/chats/00000000-0000-0000-0000-000000000002/messages-POST] PASSED [ 86%]
|
||||
unit-tests/test_mr_regressions.py::test_stale_positive_cache_never_authorizes_revoked_token[/api/v1/auth/sessions/current-DELETE] PASSED [ 86%]
|
||||
unit-tests/test_mr_regressions.py::test_valid_cache_hit_checks_session_without_loading_user PASSED [ 87%]
|
||||
unit-tests/test_mr_regressions.py::test_database_failure_on_positive_cache_hit_is_503 PASSED [ 87%]
|
||||
unit-tests/test_mr_regressions.py::test_cursor_timestamp_is_rejected_through_http[messages--1] PASSED [ 88%]
|
||||
unit-tests/test_mr_regressions.py::test_cursor_timestamp_is_rejected_through_http[messages-253402300800000000] PASSED [ 88%]
|
||||
unit-tests/test_mr_regressions.py::test_cursor_timestamp_is_rejected_through_http[messages-1000000000000000000000000000000] PASSED [ 88%]
|
||||
unit-tests/test_mr_regressions.py::test_cursor_timestamp_is_rejected_through_http[messages-True] PASSED [ 89%]
|
||||
unit-tests/test_mr_regressions.py::test_cursor_timestamp_is_rejected_through_http[messages-1.5] PASSED [ 89%]
|
||||
unit-tests/test_mr_regressions.py::test_cursor_timestamp_is_rejected_through_http[messages-1] PASSED [ 90%]
|
||||
unit-tests/test_mr_regressions.py::test_cursor_timestamp_is_rejected_through_http[messages-None] PASSED [ 90%]
|
||||
unit-tests/test_mr_regressions.py::test_cursor_timestamp_is_rejected_through_http[chats--1] PASSED [ 91%]
|
||||
unit-tests/test_mr_regressions.py::test_cursor_timestamp_is_rejected_through_http[chats-253402300800000000] PASSED [ 91%]
|
||||
unit-tests/test_mr_regressions.py::test_cursor_timestamp_is_rejected_through_http[chats-1000000000000000000000000000000] PASSED [ 92%]
|
||||
unit-tests/test_mr_regressions.py::test_cursor_timestamp_is_rejected_through_http[chats-True] PASSED [ 92%]
|
||||
unit-tests/test_mr_regressions.py::test_cursor_timestamp_is_rejected_through_http[chats-1.5] PASSED [ 92%]
|
||||
unit-tests/test_mr_regressions.py::test_cursor_timestamp_is_rejected_through_http[chats-1] PASSED [ 93%]
|
||||
unit-tests/test_mr_regressions.py::test_cursor_timestamp_is_rejected_through_http[chats-None] PASSED [ 93%]
|
||||
unit-tests/test_mr_regressions.py::test_timestamp_boundaries_roundtrip[0] PASSED [ 94%]
|
||||
unit-tests/test_mr_regressions.py::test_timestamp_boundaries_roundtrip[253402300799999999] PASSED [ 94%]
|
||||
unit-tests/test_mr_regressions.py::test_message_key_validation[None] PASSED [ 95%]
|
||||
unit-tests/test_mr_regressions.py::test_message_key_validation[] PASSED [ 95%]
|
||||
unit-tests/test_mr_regressions.py::test_message_key_validation[bad key] PASSED [ 96%]
|
||||
unit-tests/test_mr_regressions.py::test_message_key_validation[xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx] PASSED [ 96%]
|
||||
unit-tests/test_mr_regressions.py::test_message_key_validation[a?b] PASSED [ 96%]
|
||||
unit-tests/test_mr_regressions.py::test_message_key_validation[a,b] PASSED [ 97%]
|
||||
unit-tests/test_mr_regressions.py::test_message_normalization_and_conflict PASSED [ 97%]
|
||||
unit-tests/test_mr_regressions.py::test_instance_header_matches_process_on_all_responses[/health/live] PASSED [ 98%]
|
||||
unit-tests/test_mr_regressions.py::test_instance_header_matches_process_on_all_responses[/missing] PASSED [ 98%]
|
||||
unit-tests/test_mr_regressions.py::test_instance_header_matches_process_on_all_responses[/api/v1/users/me] PASSED [ 99%]
|
||||
unit-tests/test_mr_regressions.py::test_instance_alias_changes_between_applications PASSED [ 99%]
|
||||
unit-tests/test_mr_regressions.py::test_sigterm_drops_readiness_and_requests_graceful_exit PASSED [100%]
|
||||
|
||||
=============================== warnings summary ===============================
|
||||
../usr/local/lib/python3.12/site-packages/fastapi/testclient.py:1
|
||||
/usr/local/lib/python3.12/site-packages/fastapi/testclient.py:1: StarletteDeprecationWarning: Using `httpx` with `starlette.testclient` is deprecated; install `httpx2` instead.
|
||||
from starlette.testclient import TestClient as TestClient # noqa
|
||||
|
||||
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
|
||||
======================= 226 passed, 1 warning in 46.79s ========================
|
||||
Container mtusi-messenger-lab3-db-1 Running
|
||||
Container mtusi-messenger-lab3-redis-1 Running
|
||||
|
||||
exit_code=0; elapsed_seconds=53.031
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"status": "PASS",
|
||||
"at_utc": "2026-11-02T14:15:07.979020+00:00"
|
||||
}
|
||||
Reference in New Issue
Block a user