summaryrefslogtreecommitdiffstats
path: root/integration-test/src/test/resources
diff options
context:
space:
mode:
Diffstat (limited to 'integration-test/src/test/resources')
-rw-r--r--integration-test/src/test/resources/application.yml96
-rw-r--r--integration-test/src/test/resources/liquibase/test-changelog.yaml628
2 files changed, 92 insertions, 632 deletions
diff --git a/integration-test/src/test/resources/application.yml b/integration-test/src/test/resources/application.yml
index 55560aa626..1a08e542b6 100644
--- a/integration-test/src/test/resources/application.yml
+++ b/integration-test/src/test/resources/application.yml
@@ -15,14 +15,24 @@
# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END=========================================================
+rest:
+ api:
+ cps-base-path: /cps/api
+ ncmp-base-path: /ncmp
+ ncmp-inventory-base-path: /ncmpInventory
+
spring:
+ main:
+ banner-mode: off
+
+ application:
+ name: cps-integration-test
+
jpa:
- ddl-auto: create
- show-sql: false
properties:
hibernate.enable_lazy_load_no_trans: true
hibernate.dialect: org.hibernate.dialect.PostgreSQLDialect
- hibernate.format_sql: true
+ hibernate.format_sql: false
hibernate.show_sql: false
# Please ensure these values match those used in cps-application/src/main/resources/application.yml
hibernate.id.new_generator_mappings: true
@@ -34,6 +44,84 @@ spring:
password: ${DB_PASSWORD}
driverClassName: org.postgresql.Driver
initialization-mode: always
+ hikari:
+ minimumIdle: 5
+ maximumPoolSize: 80
+ idleTimeout: 60000
+ connectionTimeout: 120000
+ leakDetectionThreshold: 30000
+ pool-name: CpsDatabasePool
+
+ cache:
+ type: caffeine
+ cache-names: yangSchema
+ caffeine:
+ spec: maximumSize=10000,expireAfterAccess=10m
liquibase:
- change-log: classpath:liquibase/test-changelog.yaml
+ change-log: classpath:changelog/changelog-master.yaml
+
+ servlet:
+ multipart:
+ enabled: true
+ max-file-size: 100MB
+ max-request-size: 100MB
+
+ jackson:
+ default-property-inclusion: NON_NULL
+ serialization:
+ FAIL_ON_EMPTY_BEANS: false
+
+ sql:
+ init:
+ mode: ALWAYS
+
+notification:
+ enabled: false
+
+springdoc:
+ swagger-ui:
+ disable-swagger-default-url: true
+ urlsPrimaryName: cps-core
+ urls:
+ - name: cps-core
+ url: /api-docs/cps-core/openapi.yaml
+ - name: cps-ncmp
+ url: /api-docs/cps-ncmp/openapi.yaml
+ - name: cps-ncmp-inventory
+ url: /api-docs/cps-ncmp/openapi-inventory.yaml
+
+security:
+ # comma-separated uri patterns which do not require authorization
+ permit-uri: /actuator/**,/swagger-ui.html,/swagger-ui/**,/swagger-resources/**,/api-docs/**,/v3/api-docs/**
+ auth:
+ username: cps
+ password: cpsr0cks!
+
+# Actuator
+management:
+ endpoints:
+ web:
+ exposure:
+ include: info,health,loggers,prometheus
+ endpoint:
+ health:
+ show-details: always
+ # kubernetes probes: liveness and readiness
+ probes:
+ enabled: false
+
+logging:
+ format: text
+ level:
+ org:
+ springframework: INFO
+ onap:
+ cps: INFO
+
+hazelcast:
+ cluster-name: cps-and-ncmp-test-caches
+ mode:
+ kubernetes:
+ enabled: false
+ service-name: cps-and-ncmp-service
diff --git a/integration-test/src/test/resources/liquibase/test-changelog.yaml b/integration-test/src/test/resources/liquibase/test-changelog.yaml
deleted file mode 100644
index ba639ede01..0000000000
--- a/integration-test/src/test/resources/liquibase/test-changelog.yaml
+++ /dev/null
@@ -1,628 +0,0 @@
-# ============LICENSE_START=======================================================
-# Copyright (c) 2023-2024 Nordix Foundation.
-# ================================================================================
-# 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.
-# ============LICENSE_END=========================================================
-
-databaseChangeLog:
- - changeSet:
- id: 1-1
- author: cps
- changes:
- - createTable:
- columns:
- - column:
- autoIncrement: true
- constraints:
- nullable: false
- primaryKey: true
- primaryKeyName: anchor_pkey
- name: id
- type: BIGINT
- - column:
- name: name
- type: TEXT
- - column:
- name: schema_set_id
- type: INTEGER
- - column:
- constraints:
- nullable: false
- name: dataspace_id
- type: INTEGER
- tableName: anchor
- - changeSet:
- id: 1-2
- author: cps
- changes:
- - createTable:
- columns:
- - column:
- constraints:
- nullable: false
- name: from_fragment_id
- type: BIGINT
- - column:
- constraints:
- nullable: false
- name: to_fragment_id
- type: BIGINT
- - column:
- constraints:
- nullable: false
- name: relation_type_id
- type: INTEGER
- - column:
- constraints:
- nullable: false
- name: from_rel_xpath
- type: TEXT
- - column:
- constraints:
- nullable: false
- name: to_rel_xpath
- type: TEXT
- tableName: relation
- - changeSet:
- id: 1-3
- author: cps
- changes:
- - createTable:
- columns:
- - column:
- constraints:
- nullable: false
- name: relation_type
- type: TEXT
- - column:
- autoIncrement: true
- constraints:
- nullable: false
- primaryKey: true
- primaryKeyName: relation_type_pkey
- name: id
- type: INTEGER
- tableName: relation_type
- - changeSet:
- id: 1-4
- author: cps
- changes:
- - createTable:
- columns:
- - column:
- autoIncrement: false
- constraints:
- nullable: false
- primaryKey: true
- primaryKeyName: fragment_pkey
- name: id
- type: BIGINT
- - column:
- constraints:
- nullable: false
- name: xpath
- type: TEXT
- - column:
- name: attributes
- type: JSONB
- - column:
- constraints:
- nullable: false
- name: anchor_id
- type: BIGINT
- - column:
- name: parent_id
- type: BIGINT
- - column:
- name: schema_node_id
- type: INTEGER
- tableName: fragment
- - createSequence:
- dataType: BIGINT
- incrementBy: 100
- sequenceName: fragment_id_seq
- startValue: 100
- - changeSet:
- id: 1-5
- author: cps
- changes:
- - createTable:
- columns:
- - column:
- autoIncrement: true
- constraints:
- nullable: false
- primaryKey: true
- primaryKeyName: schema_set_pkey
- name: id
- type: INTEGER
- - column:
- constraints:
- nullable: false
- name: name
- type: TEXT
- - column:
- constraints:
- nullable: false
- name: dataspace_id
- type: INTEGER
- tableName: schema_set
- - changeSet:
- id: 1-6
- author: cps
- changes:
- - createTable:
- columns:
- - column:
- autoIncrement: true
- constraints:
- nullable: false
- primaryKey: true
- primaryKeyName: yang_resource_pkey
- name: id
- type: INTEGER
- - column:
- constraints:
- nullable: false
- name: name
- type: TEXT
- - column:
- constraints:
- nullable: false
- name: content
- type: TEXT
- - column:
- constraints:
- nullable: false
- name: checksum
- type: TEXT
- tableName: yang_resource
- - changeSet:
- id: 1-7
- author: cps
- changes:
- - createTable:
- columns:
- - column:
- autoIncrement: true
- constraints:
- nullable: false
- primaryKey: true
- primaryKeyName: dataspace_pkey
- name: id
- type: INTEGER
- - column:
- constraints:
- nullable: false
- name: name
- type: TEXT
- tableName: dataspace
- - changeSet:
- id: 1-8
- author: cps
- changes:
- - createTable:
- columns:
- - column:
- constraints:
- nullable: false
- name: schema_node_identifier
- type: TEXT
- - column:
- autoIncrement: true
- constraints:
- nullable: false
- primaryKey: true
- primaryKeyName: schema_node_pkey
- name: id
- type: INTEGER
- tableName: schema_node
- - changeSet:
- id: 1-9
- author: cps
- changes:
- - createTable:
- columns:
- - column:
- constraints:
- nullable: false
- name: schema_set_id
- type: INTEGER
- - column:
- constraints:
- nullable: false
- name: yang_resource_id
- type: INTEGER
- tableName: schema_set_yang_resources
- - changeSet:
- id: 1-10
- author: cps
- changes:
- - createIndex:
- columns:
- - column:
- name: schema_set_id
- indexName: FKI_ANCHOR_SCHEMA_SET_ID_FK
- tableName: anchor
- - changeSet:
- id: 1-11
- author: cps
- changes:
- - addUniqueConstraint:
- columnNames: dataspace_id, name
- constraintName: anchor_dataspace_id_name_key
- tableName: anchor
- - changeSet:
- id: 1-12
- author: cps
- changes:
- - addForeignKeyConstraint:
- baseColumnNames: anchor_id
- baseTableName: fragment
- constraintName: fragment_anchor_id_fkey
- deferrable: false
- initiallyDeferred: false
- onDelete: NO ACTION
- onUpdate: NO ACTION
- referencedColumnNames: id
- referencedTableName: anchor
- validate: true
- - changeSet:
- id: 1-13
- author: cps
- changes:
- - createIndex:
- columns:
- - column:
- name: from_fragment_id
- indexName: FKI_RELATIONS_FROM_ID_FK
- tableName: relation
- - changeSet:
- id: 1-14
- author: cps
- changes:
- - createIndex:
- columns:
- - column:
- name: to_fragment_id
- indexName: FKI_RELATIONS_TO_ID_FK
- tableName: relation
- - changeSet:
- id: 1-15
- author: cps
- changes:
- - createIndex:
- columns:
- - column:
- name: relation_type_id
- indexName: FKI_RELATION_TYPE_ID_FK
- tableName: relation
- - changeSet:
- id: 1-16
- author: cps
- changes:
- - addPrimaryKey:
- columnNames: to_fragment_id, from_fragment_id, relation_type_id
- constraintName: relation_pkey
- tableName: relation
- - changeSet:
- id: 1-17
- author: cps
- changes:
- - createIndex:
- columns:
- - column:
- name: anchor_id
- indexName: FKI_FRAGMENT_ANCHOR_ID_FK
- tableName: fragment
- - changeSet:
- id: 1-19
- author: cps
- changes:
- - createIndex:
- columns:
- - column:
- name: parent_id
- indexName: FKI_FRAGMENT_PARENT_ID_FK
- tableName: fragment
- - changeSet:
- id: 1-20
- author: cps
- changes:
- - createIndex:
- columns:
- - column:
- name: schema_node_id
- indexName: FKI_SCHEMA_NODE_ID_TO_ID
- tableName: fragment
- - changeSet:
- id: 1-22
- author: cps
- changes:
- - addUniqueConstraint:
- columnNames: anchor_id, xpath
- constraintName: fragment_anchor_id_xpath_key
- tableName: fragment
- - changeSet:
- id: 1-23
- author: cps
- changes:
- - addForeignKeyConstraint:
- baseColumnNames: from_fragment_id
- baseTableName: relation
- constraintName: relation_from_fragment_id_fkey
- deferrable: false
- initiallyDeferred: false
- onDelete: NO ACTION
- onUpdate: NO ACTION
- referencedColumnNames: id
- referencedTableName: fragment
- validate: true
- - changeSet:
- id: 1-24
- author: cps
- changes:
- - addForeignKeyConstraint:
- baseColumnNames: to_fragment_id
- baseTableName: relation
- constraintName: relation_to_fragment_id_fkey
- deferrable: false
- initiallyDeferred: false
- onDelete: NO ACTION
- onUpdate: NO ACTION
- referencedColumnNames: id
- referencedTableName: fragment
- validate: true
- - changeSet:
- id: 1-25
- author: cps
- changes:
- - addUniqueConstraint:
- columnNames: name, dataspace_id
- constraintName: schema_set_name_dataspace_id_key
- tableName: schema_set
- - changeSet:
- id: 1-26
- author: cps
- changes:
- - addForeignKeyConstraint:
- baseColumnNames: schema_set_id
- baseTableName: schema_set_yang_resources
- constraintName: schema_set_resource
- deferrable: false
- initiallyDeferred: false
- onDelete: CASCADE
- onUpdate: NO ACTION
- referencedColumnNames: id
- referencedTableName: schema_set
- validate: true
- - changeSet:
- id: 1-27
- author: cps
- changes:
- - addUniqueConstraint:
- columnNames: checksum
- constraintName: yang_resource_checksum_key
- tableName: yang_resource
- - changeSet:
- id: 1-28
- author: cps
- changes:
- - addUniqueConstraint:
- columnNames: name
- constraintName: UQ_NAME
- tableName: dataspace
- - changeSet:
- id: 1-30
- author: cps
- changes:
- - addForeignKeyConstraint:
- baseColumnNames: dataspace_id
- baseTableName: schema_set
- constraintName: schema_set_dataspace
- deferrable: false
- initiallyDeferred: false
- onDelete: CASCADE
- onUpdate: CASCADE
- referencedColumnNames: id
- referencedTableName: dataspace
- validate: true
- - changeSet:
- id: 1-31
- author: cps
- changes:
- - createIndex:
- columns:
- - column:
- name: schema_node_identifier
- indexName: PERF_SCHEMA_NODE_SCHEMA_NODE_ID
- tableName: schema_node
- - changeSet:
- id: 1-32
- author: cps
- changes:
- - addForeignKeyConstraint:
- baseColumnNames: yang_resource_id
- baseTableName: schema_set_yang_resources
- constraintName: schema_set_yang_resources_yang_resource_id_fkey
- deferrable: false
- initiallyDeferred: false
- onDelete: NO ACTION
- onUpdate: NO ACTION
- referencedColumnNames: id
- referencedTableName: yang_resource
- validate: true
- - changeSet:
- id: 1-33
- author: cps
- changes:
- - addForeignKeyConstraint:
- baseColumnNames: dataspace_id
- baseTableName: anchor
- constraintName: anchor_dataspace_id_fkey
- deferrable: false
- initiallyDeferred: false
- onDelete: NO ACTION
- onUpdate: NO ACTION
- referencedColumnNames: id
- referencedTableName: dataspace
- validate: true
- - changeSet:
- id: 1-34
- author: cps
- changes:
- - addForeignKeyConstraint:
- baseColumnNames: schema_set_id
- baseTableName: anchor
- constraintName: anchor_schema_set_id_fkey
- deferrable: false
- initiallyDeferred: false
- onDelete: NO ACTION
- onUpdate: NO ACTION
- referencedColumnNames: id
- referencedTableName: schema_set
- validate: true
- - changeSet:
- id: 1-35
- author: cps
- changes:
- - addForeignKeyConstraint:
- baseColumnNames: relation_type_id
- baseTableName: relation
- constraintName: relation_relation_type_id_fkey
- deferrable: false
- initiallyDeferred: false
- onDelete: NO ACTION
- onUpdate: NO ACTION
- referencedColumnNames: id
- referencedTableName: relation_type
- validate: true
- - changeSet:
- id: 1-36
- author: cps
- changes:
- - addForeignKeyConstraint:
- baseColumnNames: parent_id
- baseTableName: fragment
- constraintName: fragment_parent_id_fkey
- deferrable: false
- initiallyDeferred: false
- onDelete: NO ACTION
- onUpdate: NO ACTION
- referencedColumnNames: id
- referencedTableName: fragment
- validate: true
- - changeSet:
- id: 1-37
- author: cps
- changes:
- - addForeignKeyConstraint:
- baseColumnNames: schema_node_id
- baseTableName: fragment
- constraintName: fragment_schema_node_id_fkey
- deferrable: false
- initiallyDeferred: false
- onDelete: NO ACTION
- onUpdate: NO ACTION
- referencedColumnNames: id
- referencedTableName: schema_node
- validate: true
-
-
- - changeSet:
- id: 1-38
- label: add-module-name-and-revision-column
- author: cps
- changes:
- - addColumn:
- tableName: yang_resource
- columns:
- - column:
- name: module_name
- type: TEXT
- - column:
- name: revision
- type: TEXT
-
- - changeSet:
- id: 1-39
- label: update-previous-data-module-name-and-revision
- author: cps
- changes:
- - sql:
- sql: update yang_resource set module_name = 'dummy_module_name', revision = '2021-08-04' where module_name is null and revision is null
- rollback:
- sql: update yang_resource set module_name = null, revision = null where module_name = 'dummy_module_name' and revision = '2021-08-04'
-
- - changeSet:
- author: cps
- label: yang-resource-rename-column
- id: 1-40
- changes:
- - renameColumn:
- tableName: yang_resource
- columnDataType: TEXT
- oldColumnName: name
- newColumnName: file_name
- rollback:
- - sql:
- sql: alter table yang_resource rename column file_name to name
-
- - changeSet:
- author: cps
- id: 1-41
- changes:
- - createIndex:
- columns:
- - column:
- name: schema_set_id
- indexName: FKI_SCHEMA_SET_YANG_RESOURCES_SCHEMA_SET_ID_FK
- tableName: schema_set_yang_resources
- rollback:
- - dropIndex:
- indexName: FKI_SCHEMA_SET_YANG_RESOURCES_SCHEMA_SET_ID_FK
- tableName: schema_set_yang_resources
-
- - changeSet:
- author: cps
- id: 1-42
- changes:
- - dropForeignKeyConstraint:
- baseTableName: fragment
- constraintName: fragment_parent_id_fkey
- - addForeignKeyConstraint:
- baseColumnNames: parent_id
- baseTableName: fragment
- constraintName: fragment_parent_id_fkey
- deferrable: false
- initiallyDeferred: false
- onDelete: CASCADE
- onUpdate: NO ACTION
- referencedColumnNames: id
- referencedTableName: fragment
- validate: true
- rollback:
- - dropForeignKeyConstraint:
- baseTableName: fragment
- constraintName: fragment_parent_id_fkey
- - addForeignKeyConstraint:
- baseColumnNames: parent_id
- baseTableName: fragment
- constraintName: fragment_parent_id_fkey
- deferrable: false
- initiallyDeferred: false
- onDelete: NO ACTION
- onUpdate: NO ACTION
- referencedColumnNames: id
- referencedTableName: fragment
- validate: true