You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the SqlServerContainer, in this example with the image mcr.microsoft.com/mssql/server:2022-CU12-ubuntu-22.04, some parameters have no effect on the actual database and lead to failures. It seems like they are just not respected.
To Reproduce
importsqlalchemyfromtestcontainers.mssqlimportSqlServerContainerdeftest_showcase_bug():
withSqlServerContainer(image="mcr.microsoft.com/mssql/server:2022-CU12-ubuntu-22.04", username="dummy") asmssql:
engine=sqlalchemy.create_engine(mssql.get_connection_url()) # this includes the username "dummy" now.print(mssql.get_connection_url())
withengine.begin() asconnection:
result=connection.execute(sqlalchemy.text("select @@VERSION"))
It loads a while. When looking at the database logs, it prints:
2024-11-14 10:39:43.81 Logon Error: 18456, Severity: 14, State: 5.
2024-11-14 10:39:43.81 Logon Login failed for user 'dummy'. Reason: Could not find a login matching the name provided. [CLIENT: 172.17.0.3]
Same thing for other parameters, for example db_name.
Runtime environment
Provide a summary of your runtime environment. Which operating system, python version, and docker version are you using? What is the version of testcontainers-python you are using? You can run the following commands to get the relevant information.
Windows 11
Python 3.11.9
testcontainers 4.8.2
sqlalchemy 2.0.36
pymssql 2.3.1
Thanks for your work!
The text was updated successfully, but these errors were encountered:
Describe the bug
When running the SqlServerContainer, in this example with the image
mcr.microsoft.com/mssql/server:2022-CU12-ubuntu-22.04
, some parameters have no effect on the actual database and lead to failures. It seems like they are just not respected.To Reproduce
It loads a while. When looking at the database logs, it prints:
Same thing for other parameters, for example
db_name
.Runtime environment
Provide a summary of your runtime environment. Which operating system, python version, and docker version are you using? What is the version of
testcontainers-python
you are using? You can run the following commands to get the relevant information.Windows 11
Python 3.11.9
testcontainers 4.8.2
sqlalchemy 2.0.36
pymssql 2.3.1
Thanks for your work!
The text was updated successfully, but these errors were encountered: