From 2f631c814a3b6f3edc781201f15e83f61f5bd844 Mon Sep 17 00:00:00 2001 From: Charles de Beauchesne Date: Fri, 20 Sep 2024 15:16:37 +0200 Subject: [PATCH] Use mssql/server:2022-latest for MsSql container (#3082) --- utils/_context/_scenarios/endtoend.py | 4 ++-- utils/_context/containers.py | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/utils/_context/_scenarios/endtoend.py b/utils/_context/_scenarios/endtoend.py index 223bbdceb0..cc284ee71c 100644 --- a/utils/_context/_scenarios/endtoend.py +++ b/utils/_context/_scenarios/endtoend.py @@ -14,7 +14,7 @@ CassandraContainer, RabbitMqContainer, MySqlContainer, - SqlServerContainer, + MsSqlServerContainer, create_network, BuddyContainer, TestedContainer, @@ -85,7 +85,7 @@ def __init__( self._supporting_containers.append(MySqlContainer(host_log_folder=self.host_log_folder)) if include_sqlserver: - self._supporting_containers.append(SqlServerContainer(host_log_folder=self.host_log_folder)) + self._supporting_containers.append(MsSqlServerContainer(host_log_folder=self.host_log_folder)) self._required_containers.extend(self._supporting_containers) diff --git a/utils/_context/containers.py b/utils/_context/containers.py index e0e38717a9..ac00f549fd 100644 --- a/utils/_context/containers.py +++ b/utils/_context/containers.py @@ -918,7 +918,7 @@ def __init__(self, host_log_folder) -> None: ) -class SqlServerContainer(SqlDbTestedContainer): +class MsSqlServerContainer(SqlDbTestedContainer): def __init__(self, host_log_folder) -> None: self.data_mssql = f"./{host_log_folder}/data-mssql" healthcheck = {} @@ -926,13 +926,14 @@ def __init__(self, host_log_folder) -> None: # [!NOTE] sqlcmd tool is not available inside the ARM64 version of SQL Edge containers. # see https://hub.docker.com/_/microsoft-azure-sql-edge # XXX: Using 127.0.0.1 here instead of localhost to avoid using IPv6 in some systems. + # -C : trust self signed certificates healthcheck = { - "test": '/opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -U sa -P "yourStrong(!)Password" -Q "SELECT 1" -b -o /dev/null', + "test": '/opt/mssql-tools18/bin/sqlcmd -S 127.0.0.1 -U sa -P "yourStrong(!)Password" -Q "SELECT 1" -b -C', "retries": 20, } super().__init__( - image_name="mcr.microsoft.com/azure-sql-edge:latest", + image_name="mcr.microsoft.com/mssql/server:2022-latest", name="mssql", cap_add=["SYS_PTRACE"], user="root",