Fix MS Sql Server integration tests.

Closes #1638
This commit is contained in:
Jens Schauder
2023-10-11 15:54:56 +02:00
parent 64eeecd1e3
commit 9c36eb970b
3 changed files with 5 additions and 3 deletions

View File

@@ -21,10 +21,11 @@ import java.util.Locale;
* Supported database types. Types are defined to express against which database a particular test is expected to run.
*
* @author Mark Paluch
* @author Jens Schauder
*/
public enum DatabaseType {
DB2, HSQL, H2, MARIADB, MYSQL, ORACLE, POSTGRES, SQL_SEVER("mssql");
DB2, HSQL, H2, MARIADB, MYSQL, ORACLE, POSTGRES, SQL_SERVER("mssql");
private final String profile;

View File

@@ -43,7 +43,7 @@ class LicenseListener implements TestExecutionListener {
assumeLicenseAccepted(Db2DataSourceConfiguration.DOCKER_IMAGE_NAME);
}
if (environment.matchesProfiles(DatabaseType.SQL_SEVER.getProfile())) {
if (environment.matchesProfiles(DatabaseType.SQL_SERVER.getProfile())) {
assumeLicenseAccepted(MS_SQL_SERVER_VERSION);
}
}

View File

@@ -31,10 +31,11 @@ import com.microsoft.sqlserver.jdbc.SQLServerDataSource;
*
* @author Thomas Lang
* @author Mark Paluch
* @author Jens Schauder
* @see <a href="https://github.com/testcontainers/testcontainers-java/tree/master/modules/mssqlserver"></a>
*/
@Configuration(proxyBeanMethods = false)
@ConditionalOnDatabase(DatabaseType.MARIADB)
@ConditionalOnDatabase(DatabaseType.SQL_SERVER)
public class MsSqlDataSourceConfiguration extends DataSourceConfiguration {
public static final String MS_SQL_SERVER_VERSION = "mcr.microsoft.com/mssql/server:2022-CU5-ubuntu-20.04";