Skip to content

Commit

Permalink
tests for workload tracing (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldmitry authored Nov 26, 2024
1 parent f113071 commit ed4129d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/integration/test_self_tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,13 @@ async def test_verify_trace_http_remote(ops_test: OpsTest):

# adjust back to the default interval time
await ops_test.model.set_config({"update-status-hook-interval": "5m"})


@pytest.mark.abort_on_fail
async def test_workload_traces(ops_test: OpsTest):
# verify traces from tempo-scalable-single-binary are ingested
assert await get_traces_patiently(
await get_application_ip(ops_test, APP_NAME),
service_name="tempo-scalable-single-binary",
tls=False,
)
10 changes: 10 additions & 0 deletions tests/integration/test_tls.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,16 @@ async def test_verify_traces_force_enabled_protocols_tls(ops_test: OpsTest, nonc
await get_traces_patiently(tempo_host, service_name=f"tracegen-{protocol}")


@pytest.mark.abort_on_fail
async def test_workload_traces_tls(ops_test: OpsTest):
tempo_host = await get_ingress_proxied_hostname(ops_test)
# verify traces from tempo-scalable-single-binary are ingested
assert await get_traces_patiently(
tempo_host,
service_name="tempo-scalable-single-binary",
)


@pytest.mark.teardown
@pytest.mark.abort_on_fail
async def test_remove_relation(ops_test: OpsTest):
Expand Down

0 comments on commit ed4129d

Please sign in to comment.