Describe the bug
Microsoft changes the mssql-tools folder name to mssql-tools18 at 2019-latest and 2022-latest. Testcontainer could not use the right path to check database status by mssql tool.
|
status, _ = self.exec(f"/opt/mssql-tools/bin/sqlcmd -U {self.username} -P {self.password} -Q 'SELECT 1'") |
Relate microsoft/mssql-docker#892 (comment)
To Reproduce
from testcontainers.mssql import SqlServerContainer
mssql = SqlServerContainer("mcr.microsoft.com/mssql/server:2019-latest").start()
Solution
We need to determine the exact location of the MSSQL tool before utilizing it.
Describe the bug
Microsoft changes the
mssql-toolsfolder name tomssql-tools18at2019-latestand2022-latest. Testcontainer could not use the right path to check database status by mssql tool.testcontainers-python/modules/mssql/testcontainers/mssql/__init__.py
Line 55 in e1e3d13
Relate microsoft/mssql-docker#892 (comment)
To Reproduce
Solution
We need to determine the exact location of the MSSQL tool before utilizing it.