diff options
author | Temoc Rodriguez <cr056n@att.com> | 2017-12-14 15:58:32 -0800 |
---|---|---|
committer | Temoc Rodriguez <cr056n@att.com> | 2017-12-15 09:09:12 -0800 |
commit | 4c8000e91a9dee0738e55e2bda930b94af474157 (patch) | |
tree | 578fdc9102ea43ad4765ba2d2dbb1322b24a37a2 /controlloop/common/guard/src/test/resources/META-INF | |
parent | 5cfd3b7066e6a6305e140fa59b1fccb8e3c5f81b (diff) |
Add guard junits
Added a few junit files which test most functionality in the guard
submodule. Some minor bugs were found by the junits and fixed those
newly found bugs. Added persistence.xml for use by junits in guard.
Issue-ID: POLICY-490
Change-Id: Ied7e276cfd417e1f396b5a6685a2e9acc9efd109
Signed-off-by: Temoc Rodriguez <cr056n@att.com>
Diffstat (limited to 'controlloop/common/guard/src/test/resources/META-INF')
-rw-r--r-- | controlloop/common/guard/src/test/resources/META-INF/persistence.xml | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/controlloop/common/guard/src/test/resources/META-INF/persistence.xml b/controlloop/common/guard/src/test/resources/META-INF/persistence.xml new file mode 100644 index 000000000..f55c2f2d7 --- /dev/null +++ b/controlloop/common/guard/src/test/resources/META-INF/persistence.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<persistence version="2.1" + xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"> + + <!-- In-mem DB for junit --> + <persistence-unit name="TestOperationsHistoryPU" + transaction-type="RESOURCE_LOCAL"> + <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider> + <class>org.onap.policy.controlloop.eventmanager.OperationsHistoryDbEntry</class> + <properties> + <property name="eclipselink.ddl-generation" value="create-or-extend-tables" /> + <property name="javax.persistence.jdbc.driver" value="org.h2.Driver" /> + <property name="javax.persistence.jdbc.url" value="jdbc:h2:mem:test" /> + <property name="javax.persistence.jdbc.user" value="sa" /> + <property name="javax.persistence.jdbc.password" value="" /> + <property name="eclipselink.logging.level" value="CONFIG" /> + </properties> + </persistence-unit> + + +</persistence> |