Skip to content

Commit

Permalink
Fixes some tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
decko committed Oct 16, 2023
1 parent 782e4e8 commit c22e300
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,9 @@ async def server_fixture(tracer, aiohttp_server):


def test_checking_instrumentor_pkg_installed():
itered_entry_points = iter(entry_points(
"opentelemetry_instrumentor", "aiohttp-server"))

instrumentor = next(itered_entry_points).load()()
(instrumentor_entrypoint,) = entry_points(group="opentelemetry_instrumentor", name="aiohttp-server")
instrumentor = instrumentor_entrypoint.load()()
assert (isinstance(instrumentor, AioHttpServerInstrumentor))


Expand Down Expand Up @@ -98,7 +97,7 @@ async def test_status_code_instrumentation(

[span] = memory_exporter.get_finished_spans()

assert expected_method == span.attributes[SpanAttributes.HTTP_METHOD]
assert expected_method.value == span.attributes[SpanAttributes.HTTP_METHOD]
assert expected_status_code == span.attributes[SpanAttributes.HTTP_STATUS_CODE]

assert f"http://{server.host}:{server.port}{url}" == span.attributes[
Expand Down

0 comments on commit c22e300

Please sign in to comment.