Skip to content

Fix opentelemetry-util-http tests #2634

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,11 @@ commands_pre =
processor-baggage: pip install opentelemetry-sdk@{env:CORE_REPO}\#egg=opentelemetry-sdk&subdirectory=opentelemetry-sdk
processor-baggage: pip install -r {toxinidir}/processor/opentelemetry-processor-baggage/test-requirements.txt

http: pip install opentelemetry-api@{env:CORE_REPO}\#egg=opentelemetry-api&subdirectory=opentelemetry-api
http: pip install opentelemetry-semantic-conventions@{env:CORE_REPO}\#egg=opentelemetry-semantic-conventions&subdirectory=opentelemetry-semantic-conventions
http: pip install opentelemetry-sdk@{env:CORE_REPO}\#egg=opentelemetry-sdk&subdirectory=opentelemetry-sdk
http: pip install opentelemetry-test-utils@{env:CORE_REPO}\#egg=opentelemetry-test-utils&subdirectory=tests/opentelemetry-test-utils
http: pip install -r {toxinidir}/util/opentelemetry-util-http/test-requirements.txt
http: pip install {toxinidir}/util/opentelemetry-util-http

; In order to get a health coverage report,
Expand Down
12 changes: 12 additions & 0 deletions util/opentelemetry-util-http/test-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
asgiref==3.7.2
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
packaging==24.0
pluggy==1.5.0
py-cpuinfo==9.0.0
pytest==7.4.4
pytest-benchmark==4.0.0
tomli==2.0.1
typing_extensions==4.10.0
-e opentelemetry-instrumentation
4 changes: 2 additions & 2 deletions util/opentelemetry-util-http/tests/test_sanitize_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def test_standard_method_lowercase(self):

def test_nonstandard_method(self):
method = sanitize_method("UNKNOWN")
self.assertEqual(method, "NONSTANDARD")
self.assertEqual(method, "_OTHER")

@patch.dict(
"os.environ",
Expand All @@ -42,4 +42,4 @@ def test_nonstandard_method(self):
)
def test_nonstandard_method_allowed(self):
method = sanitize_method("UNKNOWN")
self.assertEqual(method, "NONSTANDARD")
self.assertEqual(method, "UNKNOWN")