forked from mtusi2026/mtusi2026lab7
Implement lab 7 transport security and worker containment
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
........................................................................ [ 7%]
|
||||
........................................................................ [ 14%]
|
||||
........................................................................ [ 21%]
|
||||
........................................................................ [ 28%]
|
||||
............................................................F........... [ 36%]
|
||||
........................................................................ [ 43%]
|
||||
........................................................................ [ 50%]
|
||||
........................................................................ [ 57%]
|
||||
........................................................................ [ 64%]
|
||||
........................................................................ [ 72%]
|
||||
................................................s....................... [ 79%]
|
||||
........................................................................ [ 86%]
|
||||
........................................................................ [ 93%]
|
||||
......s........................................................ [100%]
|
||||
=================================== FAILURES ===================================
|
||||
___________ test_context_survives_outbox_delivery_and_lease_recovery ___________
|
||||
|
||||
client = <httpx.AsyncClient object at 0x128a83590>
|
||||
|
||||
async def test_context_survives_outbox_delivery_and_lease_recovery(client: AsyncClient) -> None:
|
||||
provider = TracerProvider(shutdown_on_exit=False)
|
||||
tracer = provider.get_tracer("test")
|
||||
with tracer.start_as_current_span("upload", kind=SpanKind.SERVER):
|
||||
origin = capture_context()
|
||||
_, _, attachment_id = await accepted(client)
|
||||
job = await job_of(attachment_id)
|
||||
async with sql_connection() as connection:
|
||||
assert (
|
||||
await connection.scalar(select(JobRow.trace_context).where(JobRow.job_id == job.id))
|
||||
== origin
|
||||
)
|
||||
assert (
|
||||
await connection.scalar(
|
||||
select(OutboxRow.trace_context).where(OutboxRow.job_id == job.id)
|
||||
)
|
||||
== origin
|
||||
)
|
||||
pipeline = await pipeline_of(client)
|
||||
await pipeline.publish()
|
||||
> assert pipeline.publisher.contexts == [origin]
|
||||
E AssertionError: assert [{}, {'tracep...0c95827a-03'}] == [{'traceparen...0c95827a-03'}]
|
||||
E
|
||||
E At index 0 diff: {} != {'traceparent': '00-c10c079f76aa2b71e389ac3cbb0e8676-3bb4c2360c95827a-03'}
|
||||
E Left contains one more item: {'traceparent': '00-c10c079f76aa2b71e389ac3cbb0e8676-3bb4c2360c95827a-03'}
|
||||
E Use -v to get more diff
|
||||
|
||||
student-tests/api/test_trace_context.py:37: AssertionError
|
||||
=========================== short test summary info ============================
|
||||
FAILED student-tests/api/test_trace_context.py::test_context_survives_outbox_delivery_and_lease_recovery
|
||||
1 failed, 996 passed, 2 skipped, 19 deselected in 171.38s (0:02:51)
|
||||
Reference in New Issue
Block a user