Skip to content

Commit

Permalink
Merge branch 'main' into bugfix/2083-extract-topic
Browse files Browse the repository at this point in the history
  • Loading branch information
bourbonkk authored Oct 16, 2024
2 parents 9ae469d + d7d7e96 commit bae762a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,11 @@ jobs:
- name: Checkout pull request
run: git checkout ${% raw %}{{ github.event.pull_request.head.sha }}{% endraw %}
{%- endif %}
{%- if job_data != "shellcheck" %}

- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
{%- endif %}

- name: Install tox
run: pip install tox
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/misc_0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ jobs:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install tox
run: pip install tox

Expand Down
6 changes: 3 additions & 3 deletions tests/opentelemetry-docker-tests/tests/check_availability.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ def check_redis_connection():

def new_mssql_connection() -> pyodbc.Connection:
connection = pyodbc.connect(
f"DRIVER={{ODBC Driver 17 for SQL Server}};SERVER={MSSQL_HOST},"
f"{MSSQL_PORT};DATABASE=master;UID={MSSQL_USER};"
f"PWD={MSSQL_PASSWORD}",
f"DRIVER={{ODBC Driver 18 for SQL Server}};SERVER={MSSQL_HOST},"
f"{MSSQL_PORT};DATABASE=master;UID={MSSQL_USER};TrustServerCertificate=yes;"
f"PWD={MSSQL_PASSWORD};",
autocommit=True,
)
return connection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"user": os.getenv("TEST_MSSQL_USER", "sa"),
"password": os.getenv("TEST_MSSQL_PASSWORD", "yourStrong(!)Password"),
"database": os.getenv("TEST_MSSQL_DATABASE", "opentelemetry-tests"),
"driver": os.getenv("TEST_MSSQL_DRIVER", "ODBC+Driver+17+for+SQL+Server"),
"driver": os.getenv("TEST_MSSQL_DRIVER", "ODBC+Driver+18+for+SQL+Server"),
"trusted_connection": os.getenv("TEST_MSSQL_TRUSTED_CONNECTION", "yes"),
}


Expand All @@ -40,7 +41,7 @@ class MssqlConnectorTestCase(SQLAlchemyTestMixin):
VENDOR = "mssql"
SQL_DB = "opentelemetry-tests"
ENGINE_ARGS = {
"url": "mssql+pyodbc://%(user)s:%(password)s@%(host)s:%(port)s/%(database)s?driver=%(driver)s"
"url": "mssql+pyodbc://%(user)s:%(password)s@%(host)s:%(port)s/%(database)s?driver=%(driver)s&TrustServerCertificate=%(trusted_connection)s"
% MSSQL_CONFIG
}

Expand Down
2 changes: 2 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1286,6 +1286,8 @@ changedir =
tests/opentelemetry-docker-tests/tests

commands_pre =
sh -c "sudo apt update -y && sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18 unixodbc-dev unixodbc"
python -c "import pyodbc; print(pyodbc.drivers())"
pip install {env:CORE_REPO}\#egg=opentelemetry-api&subdirectory=opentelemetry-api \
{env:CORE_REPO}\#egg=opentelemetry-semantic-conventions&subdirectory=opentelemetry-semantic-conventions \
{env:CORE_REPO}\#egg=opentelemetry-sdk&subdirectory=opentelemetry-sdk \
Expand Down

0 comments on commit bae762a

Please sign in to comment.