Skip to content

Commit

Permalink
add opentelemetry-util-http to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
emdneto committed Jul 2, 2024
1 parent 9021148 commit 45bf48d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/instrumentations_1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
- "propagator-aws-xray"
- "propagator-ot-trace"
- "resource-detector-container"
- "util-http"
os: [ubuntu-20.04]
exclude:
- python-version: pypy3
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ jobs:
- "propagator-ot-trace"
- "resource-detector-container"
- "sdk-extension-aws"
- "util-http"
os: [ubuntu-20.04]
runs-on: ubuntu-20.04
steps:
Expand Down
18 changes: 12 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ envlist =
; opentelemetry-util-http
py3{8,9,10,11,12}-test-util-http
pypy3-test-util-http
lint-util-http

; opentelemetry-propagator-aws-xray
py3{8,9,10,11,12}-test-propagator-aws-xray
Expand Down Expand Up @@ -761,12 +762,12 @@ 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
util-http: pip install opentelemetry-api@{env:CORE_REPO}\#egg=opentelemetry-api&subdirectory=opentelemetry-api
util-http: pip install opentelemetry-semantic-conventions@{env:CORE_REPO}\#egg=opentelemetry-semantic-conventions&subdirectory=opentelemetry-semantic-conventions
util-http: pip install opentelemetry-sdk@{env:CORE_REPO}\#egg=opentelemetry-sdk&subdirectory=opentelemetry-sdk
util-http: pip install opentelemetry-test-utils@{env:CORE_REPO}\#egg=opentelemetry-test-utils&subdirectory=tests/opentelemetry-test-utils
util-http: pip install -r {toxinidir}/util/opentelemetry-util-http/test-requirements.txt
util-http: pip install {toxinidir}/util/opentelemetry-util-http

; In order to get a health coverage report,
; we have to install packages in editable mode.
Expand Down Expand Up @@ -1124,6 +1125,11 @@ commands =
lint-instrumentation-asyncio: pylint {toxinidir}/instrumentation/opentelemetry-instrumentation-asyncio/tests

test-util-http: pytest {toxinidir}/util/opentelemetry-util-http/tests {posargs}
lint-util-http: black --diff --check --config {toxinidir}/pyproject.toml {toxinidir}/util/opentelemetry-util-http
lint-util-http: isort --diff --check-only --settings-path {toxinidir}/.isort.cfg {toxinidir}/util/opentelemetry-util-http
lint-util-http: flake8 --config {toxinidir}/.flake8 {toxinidir}/util/opentelemetry-util-http
lint-util-http: pylint {toxinidir}/util/opentelemetry-util-http/src/opentelemetry
lint-util-http: pylint {toxinidir}/util/opentelemetry-util-http/tests

test-sdk-extension-aws: pytest {toxinidir}/sdk-extension/opentelemetry-sdk-extension-aws/tests {posargs}
lint-sdk-extension-aws: black --diff --check --config {toxinidir}/pyproject.toml {toxinidir}/sdk-extension/opentelemetry-sdk-extension-aws
Expand Down
8 changes: 6 additions & 2 deletions util/opentelemetry-util-http/tests/test_remove_credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@ def test_remove_credentials(self):
def test_remove_credentials_ipv4_literal(self):
url = "http://someuser:[email protected]:8080/test/path?query=value"
cleaned_url = remove_url_credentials(url)
self.assertEqual(cleaned_url, "http://127.0.0.1:8080/test/path?query=value")
self.assertEqual(
cleaned_url, "http://127.0.0.1:8080/test/path?query=value"
)

def test_remove_credentials_ipv6_literal(self):
url = "http://someuser:somepass@[::1]:8080/test/path?query=value"
cleaned_url = remove_url_credentials(url)
self.assertEqual(cleaned_url, "http://[::1]:8080/test/path?query=value")
self.assertEqual(
cleaned_url, "http://[::1]:8080/test/path?query=value"
)

0 comments on commit 45bf48d

Please sign in to comment.