File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
tests/opentelemetry-docker-tests/tests Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -112,8 +112,8 @@ 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 } ;"
115+ f"DRIVER={{ODBC Driver 18 for SQL Server}};SERVER={ MSSQL_HOST } ,"
116+ f"{ MSSQL_PORT } ;DATABASE=master;UID={ MSSQL_USER } ;TrustServerCertificate=yes; "
117117 f"PWD={ MSSQL_PASSWORD } ;" ,
118118 autocommit = True ,
119119 )
Original file line number Diff line number Diff line change 2929 "password" : os .getenv ("TEST_MSSQL_PASSWORD" , "yourStrong(!)Password" ),
3030 "database" : os .getenv ("TEST_MSSQL_DATABASE" , "opentelemetry-tests" ),
3131 "driver" : os .getenv ("TEST_MSSQL_DRIVER" , "ODBC+Driver+17+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 @@ -1286,7 +1286,7 @@ changedir =
12861286 tests/opentelemetry-docker-tests/tests
12871287
12881288commands_pre =
1289- sh -c " sudo apt update -y && sudo ACCEPT_EULA=Y apt-get install -y msodbcsql17 unixodbc-dev unixodbc"
1289+ sh -c " sudo apt update -y && sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18 unixodbc-dev unixodbc"
12901290 python -c " import pyodbc; print(pyodbc.drivers())"
12911291 pip install {env:CORE_REPO}\# egg=opentelemetry-api&subdirectory=opentelemetry-api \
12921292 {env:CORE_REPO}\# egg=opentelemetry-semantic-conventions&subdirectory=opentelemetry-semantic-conventions \
You can’t perform that action at this time.
0 commit comments