aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-hibernate/src/test/resources
diff options
context:
space:
mode:
authorDinh Danh Le <dinh.danh.le@ericsson.com>2018-06-21 12:06:31 +0100
committerDinh Danh Le <dinh.danh.le@ericsson.com>2018-06-21 12:15:20 +0100
commitda250358c2e887af97ff658e945deff1f277ce3b (patch)
tree70081c08dad33abeaffea0fbd2984205d46e82c6 /plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-hibernate/src/test/resources
parentbb89ed3ad0765d323b6b026fc5fdd3b4a57fcc31 (diff)
Adding Junit for plugins-persistence-jpa-hibernate
Change-Id: Iacfffb1adebabe7c4f0f40d9c76b6bd3d503b283 Issue-ID: POLICY-862 Signed-off-by: Dinh Danh Le <dinh.danh.le@ericsson.com>
Diffstat (limited to 'plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-hibernate/src/test/resources')
-rw-r--r--plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-hibernate/src/test/resources/META-INF/persistence.xml43
1 files changed, 43 insertions, 0 deletions
diff --git a/plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-hibernate/src/test/resources/META-INF/persistence.xml b/plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-hibernate/src/test/resources/META-INF/persistence.xml
new file mode 100644
index 000000000..a40e0d9fe
--- /dev/null
+++ b/plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-hibernate/src/test/resources/META-INF/persistence.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ SPDX-License-Identifier: Apache-2.0
+ ============LICENSE_END=========================================================
+-->
+<!-- This is to configure H2-IMDB using Hibernate-->
+
+<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="2.0">
+ <persistence-unit name="HiDAOtest" transaction-type="RESOURCE_LOCAL">
+ <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
+
+ <class>org.onap.policy.apex.plugins.persistence.jpa.hibernate.ReferenceKeyTestEntity</class>
+ <class>org.onap.policy.apex.plugins.persistence.jpa.hibernate.ArtifactKeyTestEntity</class>
+
+ <properties>
+ <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect" />
+ <property name="hibernate.connection.driver_class" value="org.h2.Driver" />
+ <property name="hibernate.connection.url" value="jdbc:h2:mem:test" />
+ <property name="hibernate.connection.user" value="sa" />
+ <property name="javax.persistence.jdbc.password" value="" />
+ <property name="hibernate.show_sql" value="true" />
+ <property name="hibernate.flushMode" value="FLUSH_AUTO" />
+ <property name="hibernate.temp.use_jdbc_metadata_defaults" value="false" />
+ <property name="hibernate.hbm2ddl.auto" value="create-drop" />
+ </properties>
+ </persistence-unit>
+
+</persistence> \ No newline at end of file