diff options
Diffstat (limited to 'app/src/test/resources')
-rw-r--r-- | app/src/test/resources/application-access-control.yml | 22 | ||||
-rw-r--r-- | app/src/test/resources/application-development.yml | 33 | ||||
-rw-r--r-- | app/src/test/resources/application.yml | 34 | ||||
-rw-r--r-- | app/src/test/resources/logback-spring.xml | 18 | ||||
-rw-r--r-- | app/src/test/resources/preferences/preferencesProperties.json | 80 |
5 files changed, 187 insertions, 0 deletions
diff --git a/app/src/test/resources/application-access-control.yml b/app/src/test/resources/application-access-control.yml new file mode 100644 index 0000000..5454a15 --- /dev/null +++ b/app/src/test/resources/application-access-control.yml @@ -0,0 +1,22 @@ +portal-bff.access-control: + ACTIONS_CREATE: [ onap_admin, onap_designer, onap_operator ] + ACTIONS_GET: [ onap_admin, onap_designer, onap_operator ] + ACTIONS_LIST: [ onap_admin, onap_designer, onap_operator ] + ACTIVE_ALARM_LIST: [onap_admin, onap_designer, onap_operator] + KEY_ENCRYPT_BY_USER: [onap_admin, onap_designer, onap_operator] + KEY_ENCRYPT_BY_VALUE: [onap_admin, onap_designer, onap_operator] + PREFERENCES_CREATE: [onap_admin, onap_designer, onap_operator] + PREFERENCES_GET: [onap_admin, onap_designer, onap_operator] + PREFERENCES_UPDATE: [onap_admin, onap_designer, onap_operator] + ROLE_LIST: ["*"] + TILE_GET: [onap_admin, onap_designer, onap_operator] + TILE_LIST: [onap_admin, onap_designer, onap_operator] + USER_CREATE: [onap_admin, onap_designer, onap_operator] + USER_DELETE: [onap_admin, onap_designer, onap_operator] + USER_GET: [onap_admin, onap_designer, onap_operator] + USER_LIST_AVAILABLE_ROLES: [onap_admin, onap_designer, onap_operator] + USER_LIST_ROLES: [onap_admin, onap_designer, onap_operator] + USER_LIST: [onap_admin, onap_designer, onap_operator] + USER_UPDATE_PASSWORD: [onap_admin, onap_designer, onap_operator] + USER_UPDATE_ROLES: [onap_admin, onap_designer, onap_operator] + USER_UPDATE: [onap_admin, onap_designer, onap_operator] diff --git a/app/src/test/resources/application-development.yml b/app/src/test/resources/application-development.yml new file mode 100644 index 0000000..8e97b45 --- /dev/null +++ b/app/src/test/resources/application-development.yml @@ -0,0 +1,33 @@ +logging: + level: + org.springframework.web: TRACE + +spring: + profiles: + include: access-control + security: + oauth2: + client: + provider: + keycloak: + token-uri: http://localhost:${wiremock.server.port}/auth/realms/ONAP/protocol/openid-connect/token + jwk-set-uri: http://localhost:${wiremock.server.port}/auth/realms/ONAP/protocol/openid-connect/certs + registration: + keycloak: + provider: keycloak + client-id: test + client-secret: test + authorization-grant-type: client_credentials + resourceserver: + jwt: + jwk-set-uri: http://localhost:${wiremock.server.port}/auth/realms/ONAP/protocol/openid-connect/certs + jackson: + serialization: + FAIL_ON_EMPTY_BEANS: false + +portal-bff: + realm: ONAP + portal-prefs-url: http://localhost:${wiremock.server.port} + portal-history-url: http://localhost:${wiremock.server.port} + keycloak-url: http://localhost:${wiremock.server.port} + instance-id: PORTAL diff --git a/app/src/test/resources/application.yml b/app/src/test/resources/application.yml new file mode 100644 index 0000000..f9a82d8 --- /dev/null +++ b/app/src/test/resources/application.yml @@ -0,0 +1,34 @@ +logging: + level: + org.springframework.web: TRACE + +spring: + profiles: + include: + - access-control + security: + oauth2: + client: + provider: + keycloak: + token-uri: http://localhost:${wiremock.server.port}/auth/realms/ONAP/protocol/openid-connect/token + jwk-set-uri: http://localhost:${wiremock.server.port}/auth/realms/ONAP/protocol/openid-connect/certs + registration: + keycloak: + provider: keycloak + client-id: test + client-secret: test + authorization-grant-type: client_credentials + resourceserver: + jwt: + jwk-set-uri: http://localhost:${wiremock.server.port}/auth/realms/ONAP/protocol/openid-connect/certs + jackson: + serialization: + FAIL_ON_EMPTY_BEANS: false + +portal-bff: + realm: ONAP + portal-prefs-url: http://localhost:${wiremock.server.port} + portal-history-url: http://localhost:${wiremock.server.port} + keycloak-url: http://localhost:${wiremock.server.port} + instance-id: PORTAL diff --git a/app/src/test/resources/logback-spring.xml b/app/src/test/resources/logback-spring.xml new file mode 100644 index 0000000..45bd7e2 --- /dev/null +++ b/app/src/test/resources/logback-spring.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<configuration scan="true"> + <include resource="org/springframework/boot/logging/logback/defaults.xml"/> + + <appender name="stdout" class="ch.qos.logback.core.ConsoleAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>${LOGBACK_LEVEL:-info}</level> + </filter> + <encoder> + <pattern>${CONSOLE_LOG_PATTERN}</pattern> + <charset>utf8</charset> + </encoder> + </appender> + + <root level="all"> + <appender-ref ref="stdout"/> + </root> +</configuration>
\ No newline at end of file diff --git a/app/src/test/resources/preferences/preferencesProperties.json b/app/src/test/resources/preferences/preferencesProperties.json new file mode 100644 index 0000000..dc094ec --- /dev/null +++ b/app/src/test/resources/preferences/preferencesProperties.json @@ -0,0 +1,80 @@ +{ + "dashboard": { + "apps": { + "availableTiles": [ + { + "type": "ALARM_COUNT_TILE", + "displayed": true + }, + { + "type": "KPI_GRAPH_TILE", + "displayed": true + }, + { + "type": "K8S_RESOURCE_STATUS_TILE", + "displayed": true + }, + { + "type": "USER_LAST_ACTION_TILE", + "displayed": true + } + ], + "k8sResourceStatus": "pod", + "kpiSettings": { + "primaryGraph": "erabDropRatio", + "secondaryGraph": "erabDropData", + "expanded": false + }, + "alarmTileGraphEnabled": false, + "lastUserAction": { + "interval": "1H", + "filterType": "ALL" + } + } + }, + "alarms": { + "showEmptyProperties": false + }, + "columns": [ + "id", + "baseType", + "ackState", + "alarmedObjectType", + "sourceSystemId", + "alarmedObject", + "perceivedSeverity", + "specificProblem", + "eventCategory", + "probableCause", + "proposedRepairedActions", + "comment", + "alarmRaisedTime", + "alarmReportingTime" + ], + "columnsOrder": [ + "id", + "baseType", + "ackState", + "alarmedObjectType", + "sourceSystemId", + "alarmedObject", + "perceivedSeverity", + "specificProblem", + "eventCategory", + "probableCause", + "proposedRepairedActions", + "comment", + "alarmRaisedTime", + "alarmReportingTime" + ], + "refreshInterval": "1", + "serviceInstanceSettings": { + "showAll": false + }, + "topologySettings": { + "showAll": false + }, + "treeViewSettings": { + "showAll": false + } +}
\ No newline at end of file |