Skip to content

Commit

Permalink
Simplify MSSQL Server testcontainer setup for integration tests (#25108)
Browse files Browse the repository at this point in the history
* Explicitly accept MSSQL Server container license during setup

* Remove unnecessary comments in test configuration file

* Update license acceptance to provide guidance without automatic acceptance

Co-authored-by: Marcelo Shima <marceloshima@gmail.com>

---------

Co-authored-by: Marcelo Shima <marceloshima@gmail.com>
  • Loading branch information
yhao3 and mshima authored Feb 7, 2024
1 parent 7d01100 commit b10b399
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ public class MsSqlTestContainer implements SqlTestContainer {
public void afterPropertiesSet() {
if (null == mSSQLServerContainer) {
mSSQLServerContainer = new MSSQLServerContainer<>("<%- dockerContainers.mssql %>")
// You are required to accept EULA license for SQL server containers
// Refer to https://java.testcontainers.org/modules/databases/mssqlserver/
//.acceptLicense()
.withTmpFs(Collections.singletonMap("/testtmpfs", "rw"))
.withLogConsumer(new Slf4jLogConsumer(log))
.withReuse(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@
# To activate this configuration launch integration tests with the 'testcontainers' profile
#
# More information on database containers: https://www.testcontainers.org/modules/databases/
<%_ if (devDatabaseTypeMssql) { _%>
#
# You are required to accept EULA license for SQL server containers.
# Follow the instructions at https://www.testcontainers.org/modules/databases/mssqlserver/
<%_ } _%>
<%_ if (devDatabaseTypeOracle) { _%>
#
# You have to specify an Oracle image name in a classpath file named testcontainers.properties.
Expand Down

0 comments on commit b10b399

Please sign in to comment.