File tree Expand file tree Collapse file tree 5 files changed +13
-7
lines changed
generate_workflows_lib/src/generate_workflows_lib
tests/opentelemetry-docker-tests/tests Expand file tree Collapse file tree 5 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -46,13 +46,11 @@ jobs:
4646 - name: Checkout pull request
4747 run: git checkout ${% raw %} {{ github.event.pull_request.head.sha }}{% endraw %}
4848 {% - endif %}
49- {% - if job_data != "shellcheck" %}
5049
5150 - name: Set up Python 3.10
5251 uses: actions/setup-python@v5
5352 with:
5453 python-version: "3.10"
55- {% - endif %}
5654
5755 - name: Install tox
5856 run: pip install tox
Original file line number Diff line number Diff line change @@ -122,6 +122,11 @@ jobs:
122122 - name : Checkout repo @ SHA - ${{ github.sha }}
123123 uses : actions/checkout@v4
124124
125+ - name : Set up Python 3.10
126+ uses : actions/setup-python@v5
127+ with :
128+ python-version : " 3.10"
129+
125130 - name : Install tox
126131 run : pip install tox
127132
Original file line number Diff line number Diff line change @@ -112,9 +112,9 @@ def check_redis_connection():
112112
113113def new_mssql_connection () -> pyodbc .Connection :
114114 connection = pyodbc .connect (
115- f"DRIVER={{ODBC Driver 17 for SQL Server}};SERVER={ MSSQL_HOST } ,"
116- f"{ MSSQL_PORT } ;DATABASE=master;UID={ MSSQL_USER } ;"
117- f"PWD={ MSSQL_PASSWORD } " ,
115+ f"DRIVER={{ODBC Driver 18 for SQL Server}};SERVER={ MSSQL_HOST } ,"
116+ f"{ MSSQL_PORT } ;DATABASE=master;UID={ MSSQL_USER } ;TrustServerCertificate=yes; "
117+ f"PWD={ MSSQL_PASSWORD } ; " ,
118118 autocommit = True ,
119119 )
120120 return connection
Original file line number Diff line number Diff line change 2828 "user" : os .getenv ("TEST_MSSQL_USER" , "sa" ),
2929 "password" : os .getenv ("TEST_MSSQL_PASSWORD" , "yourStrong(!)Password" ),
3030 "database" : os .getenv ("TEST_MSSQL_DATABASE" , "opentelemetry-tests" ),
31- "driver" : os .getenv ("TEST_MSSQL_DRIVER" , "ODBC+Driver+17+for+SQL+Server" ),
31+ "driver" : os .getenv ("TEST_MSSQL_DRIVER" , "ODBC+Driver+18+for+SQL+Server" ),
32+ "trusted_connection" : os .getenv ("TEST_MSSQL_TRUSTED_CONNECTION" , "yes" ),
3233}
3334
3435
@@ -40,7 +41,7 @@ class MssqlConnectorTestCase(SQLAlchemyTestMixin):
4041 VENDOR = "mssql"
4142 SQL_DB = "opentelemetry-tests"
4243 ENGINE_ARGS = {
43- "url" : "mssql+pyodbc://%(user)s:%(password)s@%(host)s:%(port)s/%(database)s?driver=%(driver)s"
44+ "url" : "mssql+pyodbc://%(user)s:%(password)s@%(host)s:%(port)s/%(database)s?driver=%(driver)s&TrustServerCertificate=%(trusted_connection)s "
4445 % MSSQL_CONFIG
4546 }
4647
Original file line number Diff line number Diff line change @@ -1287,6 +1287,8 @@ changedir =
12871287 tests/opentelemetry-docker-tests/tests
12881288
12891289commands_pre =
1290+ sh -c " sudo apt update -y && sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18 unixodbc-dev unixodbc"
1291+ python -c " import pyodbc; print(pyodbc.drivers())"
12901292 pip install {env:CORE_REPO}\# egg=opentelemetry-api&subdirectory=opentelemetry-api \
12911293 {env:CORE_REPO}\# egg=opentelemetry-semantic-conventions&subdirectory=opentelemetry-semantic-conventions \
12921294 {env:CORE_REPO}\# egg=opentelemetry-sdk&subdirectory=opentelemetry-sdk \
You can’t perform that action at this time.
0 commit comments