aboutsummaryrefslogtreecommitdiffstats
path: root/models-provider
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2019-05-09 15:54:41 +0000
committerliamfallon <liam.fallon@est.tech>2019-05-09 15:54:41 +0000
commitd034de615965ca8214396e30c85191a5aa4aa37b (patch)
treee19b0a396010b94a28f76ea86f06739c1ed479aa /models-provider
parent4a1ec1aea71bf58d371a034045defd11d9e77ce3 (diff)
Store policy type version in policy before DB write
The policy type version must be updated on a policy before it is stored to the database, otherwise the database value is incorrect. Issue-ID: POLICY-1738 Change-Id: I0a7f2da3837497dd999141f40466d6507c26159b Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'models-provider')
-rw-r--r--models-provider/src/test/java/org/onap/policy/models/provider/impl/PolicyPersistenceTest.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/models-provider/src/test/java/org/onap/policy/models/provider/impl/PolicyPersistenceTest.java b/models-provider/src/test/java/org/onap/policy/models/provider/impl/PolicyPersistenceTest.java
index a855d5d24..7fa21b021 100644
--- a/models-provider/src/test/java/org/onap/policy/models/provider/impl/PolicyPersistenceTest.java
+++ b/models-provider/src/test/java/org/onap/policy/models/provider/impl/PolicyPersistenceTest.java
@@ -86,6 +86,8 @@ public class PolicyPersistenceTest {
*/
@Before
public void setupParameters() throws PfModelException, CoderException {
+ // H2, use "org.mariadb.jdbc.Driver" and "jdbc:mariadb://localhost:3306/policy" for locally installed MariaDB
+
PolicyModelsProviderParameters parameters = new PolicyModelsProviderParameters();
parameters.setDatabaseDriver("org.h2.Driver");
parameters.setDatabaseUrl("jdbc:h2:mem:testdb");