2 * ============LICENSE_START=======================================================
3 * Copyright (C) 2021 Nordix Foundation
4 * Modifications Copyright (C) 2021 Pantheon.tech
5 * Modifications Copyright (C) 2021 Bell Canada.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the 'License');
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an 'AS IS' BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
19 * SPDX-License-Identifier: Apache-2.0
20 * ============LICENSE_END=========================================================
23 package org.onap.cps.spi.impl
25 import org.onap.cps.DatabaseTestContainer
26 import org.onap.cps.spi.repository.AnchorRepository
27 import org.onap.cps.spi.repository.DataspaceRepository
28 import org.onap.cps.spi.repository.FragmentRepository
29 import org.onap.cps.spi.repository.YangResourceRepository
30 import org.springframework.beans.factory.annotation.Autowired
31 import org.springframework.boot.test.context.SpringBootTest
32 import org.testcontainers.spock.Testcontainers
33 import spock.lang.Shared
34 import spock.lang.Specification
38 class CpsPersistenceSpecBase extends Specification {
41 DatabaseTestContainer databaseTestContainer = DatabaseTestContainer.getInstance()
44 DataspaceRepository dataspaceRepository
47 YangResourceRepository yangResourceRepository
50 AnchorRepository anchorRepository
53 FragmentRepository fragmentRepository
55 static final String CLEAR_DATA = '/data/clear-all.sql'
57 static final String DATASPACE_NAME = 'DATASPACE-001'
58 static final String DATASPACE_NAME2 = 'DATASPACE-002'
59 static final String SCHEMA_SET_NAME1 = 'SCHEMA-SET-001'
60 static final String SCHEMA_SET_NAME2 = 'SCHEMA-SET-002'
61 static final String ANCHOR_NAME1 = 'ANCHOR-001'
62 static final String ANCHOR_NAME2 = 'ANCHOR-002'
63 static final String ANCHOR_NAME3 = 'ANCHOR-003'
64 static final String ANCHOR_FOR_DATA_NODES_WITH_LEAVES = 'ANCHOR-003'
65 static final String ANCHOR_FOR_SHOP_EXAMPLE = 'ANCHOR-004'