DATAJDBC-198 - Prevent HSQL specific tests to run when a different database profile is selected.
Set active profile on HSQL specific tests to HSQL. Fixed Readme to properly reflect the need to have a Docker installation. Original pull request: #59.
This commit is contained in:
@@ -339,7 +339,7 @@ This will execute unit tests and integration tests using an in-memory database.
|
||||
|
||||
=== Running tests with a real database
|
||||
|
||||
To run the integration tests against a specific database you need to have the database running on your local machine and then execute.
|
||||
In order to run the integration tests against a specific database you need to have a local Docker installation available, and then execute.
|
||||
|
||||
[source]
|
||||
----
|
||||
|
||||
@@ -37,6 +37,7 @@ import org.springframework.data.jdbc.repository.config.EnableJdbcRepositories;
|
||||
import org.springframework.data.jdbc.testing.TestConfiguration;
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabase;
|
||||
import org.springframework.test.context.ActiveProfiles;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.rules.SpringClassRule;
|
||||
import org.springframework.test.context.junit4.rules.SpringMethodRule;
|
||||
@@ -49,6 +50,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
* @author Jens Schauder
|
||||
*/
|
||||
@ContextConfiguration
|
||||
@ActiveProfiles("hsql")
|
||||
@Transactional
|
||||
public class MyBatisCustomizingNamespaceHsqlIntegrationTests {
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ import org.springframework.data.jdbc.repository.config.EnableJdbcRepositories;
|
||||
import org.springframework.data.jdbc.testing.TestConfiguration;
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabase;
|
||||
import org.springframework.test.context.ActiveProfiles;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.rules.SpringClassRule;
|
||||
import org.springframework.test.context.junit4.rules.SpringMethodRule;
|
||||
@@ -48,6 +49,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
* @author Greg Turnquist
|
||||
*/
|
||||
@ContextConfiguration
|
||||
@ActiveProfiles("hsql")
|
||||
@Transactional
|
||||
public class MyBatisHsqlIntegrationTests {
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ import org.springframework.data.jdbc.repository.config.EnableJdbcRepositories;
|
||||
import org.springframework.data.jdbc.testing.TestConfiguration;
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
import org.springframework.test.context.ActiveProfiles;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.rules.SpringClassRule;
|
||||
import org.springframework.test.context.junit4.rules.SpringMethodRule;
|
||||
@@ -48,6 +49,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
* @author Kazuki Shimizu
|
||||
*/
|
||||
@ContextConfiguration
|
||||
@ActiveProfiles("hsql")
|
||||
@Transactional
|
||||
public class QueryAnnotationHsqlIntegrationTests {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user