Update integration tests
This commit is contained in:
@@ -61,6 +61,10 @@ final class DatabaseContainers {
|
||||
return new PostgreSql10Container();
|
||||
}
|
||||
|
||||
static PostgreSQLContainer postgreSql11() {
|
||||
return new PostgreSql11Container();
|
||||
}
|
||||
|
||||
static MSSQLServerContainer sqlServer2017() {
|
||||
return new SqlServer2017Container();
|
||||
}
|
||||
@@ -68,7 +72,7 @@ final class DatabaseContainers {
|
||||
private static class MariaDb5Container extends MariaDBContainer<MariaDb5Container> {
|
||||
|
||||
MariaDb5Container() {
|
||||
super("mariadb:5.5.61");
|
||||
super("mariadb:5.5.62");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -99,7 +103,7 @@ final class DatabaseContainers {
|
||||
private static class MySql5Container extends MySQLContainer<MySql5Container> {
|
||||
|
||||
MySql5Container() {
|
||||
super("mysql:5.7.23");
|
||||
super("mysql:5.7.24");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -119,7 +123,7 @@ final class DatabaseContainers {
|
||||
private static class MySql8Container extends MySQLContainer<MySql8Container> {
|
||||
|
||||
MySql8Container() {
|
||||
super("mysql:8.0.12");
|
||||
super("mysql:8.0.13");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -153,11 +157,20 @@ final class DatabaseContainers {
|
||||
|
||||
}
|
||||
|
||||
private static class PostgreSql11Container
|
||||
extends PostgreSQLContainer<PostgreSql11Container> {
|
||||
|
||||
PostgreSql11Container() {
|
||||
super("postgres:11.0");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class SqlServer2017Container
|
||||
extends MSSQLServerContainer<SqlServer2017Container> {
|
||||
|
||||
SqlServer2017Container() {
|
||||
super("microsoft/mssql-server-linux:2017-CU11");
|
||||
super("mcr.microsoft.com/mssql/server:2017-CU12");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Copyright 2014-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.session.jdbc;
|
||||
|
||||
import org.junit.runner.RunWith;
|
||||
import org.testcontainers.containers.PostgreSQLContainer;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import org.springframework.test.context.web.WebAppConfiguration;
|
||||
|
||||
/**
|
||||
* Integration tests for {@link JdbcOperationsSessionRepository} using PostgreSQL 11.x
|
||||
* database.
|
||||
*
|
||||
* @author Vedran Pavic
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@WebAppConfiguration
|
||||
@ContextConfiguration
|
||||
public class PostgreSql11JdbcOperationsSessionRepositoryITests
|
||||
extends AbstractContainerJdbcOperationsSessionRepositoryITests {
|
||||
|
||||
@Configuration
|
||||
static class Config extends BaseContainerConfig {
|
||||
|
||||
@Bean
|
||||
public PostgreSQLContainer databaseContainer() {
|
||||
PostgreSQLContainer databaseContainer = DatabaseContainers.postgreSql11();
|
||||
databaseContainer.start();
|
||||
return databaseContainer;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ResourceDatabasePopulator databasePopulator() {
|
||||
return DatabasePopulators.postgreSql();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
microsoft/mssql-server-linux:2017-CU11
|
||||
mcr.microsoft.com/mssql/server:2017-CU12
|
||||
|
||||
Reference in New Issue
Block a user