models-pdp
[ERROR] Failures:
[ERROR] PdpProviderTest.cudPolicyStatus_Create:742
Expected size:<2> but was:<5> in:
<[PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=idX, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=idY, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=pdp1, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=pdp2, policy=MyPolicyB 2.3.4, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=pdp3, policy=MyPolicy 10.20.30, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS)]>
[ERROR] PdpProviderTest.cudPolicyStatus_Delete:791
Expected size:<4> but was:<7> in:
<[PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=idW, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=idX, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=idY, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=idZ, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=pdp1, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=pdp2, policy=MyPolicyB 2.3.4, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=pdp3, policy=MyPolicy 10.20.30, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS)]>
[ERROR] PdpProviderTest.cudPolicyStatus_Update:763
Expected size:<4> but was:<11> in:
<[PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=idW, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=idX, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=idY, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=idZ, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=pdp1, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=pdp2, policy=MyPolicyB 2.3.4, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=pdp3, policy=MyPolicy 10.20.30, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=wId, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=xId, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=yId, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=zId, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS)]>
[ERROR] PdpProviderTest.testFromAuthorativeStatus:830
Expecting empty but was:<[PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=pdp1, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=pdp2, policy=MyPolicyB 2.3.4, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=pdp3, policy=MyPolicy 10.20.30, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS)]>
models-tosca
[ERROR] org.onap.policy.models.tosca.simple.provider.SimpleToscaProviderTest.testGetDataTypesCornerCases Time elapsed: 0.401 s <<< FAILURE!
java.lang.AssertionError:
Expecting message:
<"data types for hello:0.0.1 do not exist">
to match regex:
<"service template not found in database">
but did not.
[INFO]
I also ran the models-pdp test on postgres
Updated
src/test/java/org/onap/policy/models/pdp/persistence/provider/PdpProviderTest.java
src/test/java/org/onap/policy/models/pdp/persistence/provider/PdpStatisticsProviderTest.java
with
if (System.getProperty("USE-MARIADB") != null) { jdbcProperties.setProperty(PersistenceUnitProperties.JDBC_DRIVER, "org.mariadb.jdbc.Driver"); jdbcProperties.setProperty(PersistenceUnitProperties.JDBC_URL, "jdbc:mariadb://localhost:3306/policy"); } else if (System.getProperty("USE-POSTGRES") != null) { jdbcProperties.setProperty(PersistenceUnitProperties.JDBC_DRIVER, "org.postgresql.Driver"); jdbcProperties.setProperty(PersistenceUnitProperties.JDBC_URL, "jdbc:postgresql://localhost:5432/policy"); jdbcProperties.setProperty(PersistenceUnitProperties.TARGET_DATABASE, "PostgreSQL"); } else { jdbcProperties.setProperty(PersistenceUnitProperties.JDBC_DRIVER, "org.h2.Driver"); jdbcProperties.setProperty(PersistenceUnitProperties.JDBC_URL, "jdbc:h2:mem:PdpProviderTest"); }
Updated pom.xml
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.2.19</version>
<scope>test</scope>
</dependency>
ran
mvn clean install -DUSE-POSTGRES
[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] PdpProviderTest.cudPolicyStatus_Create:746
Expected size:<2> but was:<5> in:
<[PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=pdp3, policy=MyPolicy 10.20.30, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=pdp2, policy=MyPolicyB 2.3.4, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=pdp1, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=idY, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=idX, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS)]>
[ERROR] PdpProviderTest.cudPolicyStatus_Delete:795
Expected size:<4> but was:<7> in:
<[PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=pdp3, policy=MyPolicy 10.20.30, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=pdp2, policy=MyPolicyB 2.3.4, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=pdp1, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=idY, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=idX, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=idZ, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=idW, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS)]>
[ERROR] PdpProviderTest.cudPolicyStatus_Update:767
Expected size:<4> but was:<11> in:
<[PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=pdp3, policy=MyPolicy 10.20.30, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=pdp2, policy=MyPolicyB 2.3.4, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=pdp1, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=idY, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=idX, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=idZ, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=idW, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=zId, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=xId, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=wId, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS),
PdpPolicyStatus(pdpGroup=groupA, pdpType=MyPdpType, pdpId=yId, policy=MyPolicy 1.2.3, policyType=MyPolicyType 1.2.4, deploy=true, state=SUCCESS)]>
[ERROR] PdpProviderTest.testFromAuthorativeStatus:834
All the tests work with H2 but this is an in-memory DB so the tables/records are not persisted.