diff options
Diffstat (limited to 'main/src/test')
-rw-r--r-- | main/src/test/java/org/onap/policy/api/main/rest/TestApiStatisticsManager.java | 3 | ||||
-rw-r--r-- | main/src/test/resources/application-test.yaml | 14 |
2 files changed, 16 insertions, 1 deletions
diff --git a/main/src/test/java/org/onap/policy/api/main/rest/TestApiStatisticsManager.java b/main/src/test/java/org/onap/policy/api/main/rest/TestApiStatisticsManager.java index bc67d21c..48484d6e 100644 --- a/main/src/test/java/org/onap/policy/api/main/rest/TestApiStatisticsManager.java +++ b/main/src/test/java/org/onap/policy/api/main/rest/TestApiStatisticsManager.java @@ -26,6 +26,7 @@ package org.onap.policy.api.main.rest; import static org.junit.Assert.assertEquals; +import lombok.RequiredArgsConstructor; import org.junit.Test; import org.junit.runner.RunWith; import org.onap.policy.api.main.PolicyApiApplication; @@ -40,7 +41,7 @@ import org.springframework.test.context.junit4.SpringRunner; public class TestApiStatisticsManager { @Autowired - private ApiStatisticsManager mgr = new ApiStatisticsManager(); + private ApiStatisticsManager mgr; @Test public void testUpdateMethods() { diff --git a/main/src/test/resources/application-test.yaml b/main/src/test/resources/application-test.yaml index 240d3640..6ed69ea0 100644 --- a/main/src/test/resources/application-test.yaml +++ b/main/src/test/resources/application-test.yaml @@ -1,3 +1,17 @@ +spring: + datasource: + url: jdbc:h2:mem:testdb + driverClassName: org.h2.Driver + jpa: + properties: + hibernate: + dialect: org.hibernate.dialect.H2Dialect + hibernate: + ddl-auto: update + naming: + physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl + implicit-strategy: org.onap.policy.common.spring.utils.CustomImplicitNamingStrategy + database: name: PolicyProviderParameterGroup implementation: org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl |