diff options
author | Filip Krzywka <filip.krzywka@nokia.com> | 2019-03-20 10:42:19 +0100 |
---|---|---|
committer | Filip Krzywka <filip.krzywka@nokia.com> | 2019-03-21 14:07:49 +0100 |
commit | d2da2cc4bd18fe33124dd105608443c10f981a2d (patch) | |
tree | 141bc46ed11bda03b08b6b536d8321c06cb1e9a9 | |
parent | 4a3c1a1b963427febece0ca6235595041a3b9a99 (diff) |
Update HV-VES testsuites
This commit follows related changes made in DCAEGEN2-1340 and overall
DCAEGEN2-1151 story.
- use configuration files instead of command line parameters
- organize collector volumes for ease of use
- move environment variables to .env file for reuse
- removed redundant aliases in ves-hv-network
Change-Id: I782db9d0996308810834c322906ab861be183193
Issue-ID: DCAEGEN2-1340
Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
11 files changed, 87 insertions, 27 deletions
diff --git a/plans/dcaegen2-collectors-hv-ves/testsuites/.env b/plans/dcaegen2-collectors-hv-ves/testsuites/.env index 7e2fffcf..1558083f 100644 --- a/plans/dcaegen2-collectors-hv-ves/testsuites/.env +++ b/plans/dcaegen2-collectors-hv-ves/testsuites/.env @@ -9,4 +9,8 @@ DCAE_APP_SIMULATOR_IMAGE=hv-collector-dcae-app-simulator HV_VES_VERSION=1.1-SNAPSHOT HV_VES_HEALTHCHECK_CMD=curl --request GET --fail --silent --show-error localhost:6060/health/ready && nc -vz localhost 6061 -HV_VES_MAIN_CLASS=org.onap.dcae.collectors.veshv.main.MainKt + +JAVA_OPTS=-Dio.netty.leakDetection.level=paranoid +CONSUL_HOST=consul-server +CONFIG_BINDING_SERVICE=cbs +HV_VES_HOSTNAME=dcae-hv-ves-collector
\ No newline at end of file diff --git a/plans/dcaegen2-collectors-hv-ves/testsuites/collector/configuration/insecure.json b/plans/dcaegen2-collectors-hv-ves/testsuites/collector/configuration/insecure.json new file mode 100644 index 00000000..9af02ffd --- /dev/null +++ b/plans/dcaegen2-collectors-hv-ves/testsuites/collector/configuration/insecure.json @@ -0,0 +1,28 @@ +{ + "server": { + "listenPort": 6061, + "idleTimeoutSec": 60, + "maxPayloadSizeBytes": 1048576 + }, + "cbs": { + "firstRequestDelaySec": 5, + "requestIntervalSec": 10 + }, + "security": { + "sslDisable": true + }, + "collector": { + "maxRequestSizeBytes": 1048576, + "kafkaServers": [ + "kafka:9092" + ], + "routing": [ + { + "fromDomain": "perf3gpp", + "toTopic": "TEST_HV_VES_PERF3GPP" + } + ], + "dummyMode": false + }, + "logLevel": "DEBUG" +}
\ No newline at end of file diff --git a/plans/dcaegen2-collectors-hv-ves/testsuites/collector/configuration/secure.json b/plans/dcaegen2-collectors-hv-ves/testsuites/collector/configuration/secure.json new file mode 100644 index 00000000..5aa2b0aa --- /dev/null +++ b/plans/dcaegen2-collectors-hv-ves/testsuites/collector/configuration/secure.json @@ -0,0 +1,34 @@ +{ + "server": { + "listenPort": 6061, + "idleTimeoutSec": 60, + "maxPayloadSizeBytes": 1048576 + }, + "cbs": { + "firstRequestDelaySec": 5, + "requestIntervalSec": 10 + }, + "security": { + "sslDisable": false, + "keys": { + "keyStoreFile": "/etc/hv-ves/ssl/server.p12", + "keyStorePassword": "onaponap", + "trustStoreFile": "/etc/hv-ves/ssl/trust.p12", + "trustStorePassword": "onaponap" + } + }, + "collector": { + "maxRequestSizeBytes": 1048576, + "kafkaServers": [ + "kafka:9092" + ], + "routing": [ + { + "fromDomain": "perf3gpp", + "toTopic": "TEST_HV_VES_PERF3GPP" + } + ], + "dummyMode": false + }, + "logLevel": "DEBUG" +}
\ No newline at end of file diff --git a/plans/dcaegen2-collectors-hv-ves/testsuites/ssl/.gitignore b/plans/dcaegen2-collectors-hv-ves/testsuites/collector/ssl/.gitignore index 0729569c..0729569c 100644 --- a/plans/dcaegen2-collectors-hv-ves/testsuites/ssl/.gitignore +++ b/plans/dcaegen2-collectors-hv-ves/testsuites/collector/ssl/.gitignore diff --git a/plans/dcaegen2-collectors-hv-ves/testsuites/ssl/Makefile-openssl b/plans/dcaegen2-collectors-hv-ves/testsuites/collector/ssl/Makefile-openssl index a32d30dd..a32d30dd 100644 --- a/plans/dcaegen2-collectors-hv-ves/testsuites/ssl/Makefile-openssl +++ b/plans/dcaegen2-collectors-hv-ves/testsuites/collector/ssl/Makefile-openssl diff --git a/plans/dcaegen2-collectors-hv-ves/testsuites/ssl/README.md b/plans/dcaegen2-collectors-hv-ves/testsuites/collector/ssl/README.md index c2819d24..c2819d24 100644 --- a/plans/dcaegen2-collectors-hv-ves/testsuites/ssl/README.md +++ b/plans/dcaegen2-collectors-hv-ves/testsuites/collector/ssl/README.md diff --git a/plans/dcaegen2-collectors-hv-ves/testsuites/ssl/gen-certs.sh b/plans/dcaegen2-collectors-hv-ves/testsuites/collector/ssl/gen-certs.sh index 34572f7a..34572f7a 100755 --- a/plans/dcaegen2-collectors-hv-ves/testsuites/ssl/gen-certs.sh +++ b/plans/dcaegen2-collectors-hv-ves/testsuites/collector/ssl/gen-certs.sh diff --git a/plans/dcaegen2-collectors-hv-ves/testsuites/docker-compose.yml b/plans/dcaegen2-collectors-hv-ves/testsuites/docker-compose.yml index ac07eb78..32b39438 100644 --- a/plans/dcaegen2-collectors-hv-ves/testsuites/docker-compose.yml +++ b/plans/dcaegen2-collectors-hv-ves/testsuites/docker-compose.yml @@ -56,13 +56,14 @@ services: ports: - "10000:10000" environment: - CONSUL_HOST: "consul-server" + - CONSUL_HOST depends_on: - consul-server networks: ves-hv-default: aliases: - cbs + # # DCAE HV VES Collector # @@ -72,22 +73,19 @@ services: ports: - "6060:6060" - "6061:6061/tcp" - command: ["--listen-port", "6061", - "--kafka-bootstrap-servers", "kafka:9092", - "--key-store-password", "onaponap", - "--trust-store-password", "onaponap"] + command: ["--configuration-file", "/etc/hv-ves/configuration/secure.json"] environment: - JAVA_OPTS: "-Dio.netty.leakDetection.level=paranoid" - CONSUL_HOST: "consul-server" - CONFIG_BINDING_SERVICE: "cbs" - HOSTNAME: "dcae-hv-ves-collector" + - JAVA_OPTS + - HOSTNAME=${HV_VES_HOSTNAME} + - CONSUL_HOST + - CONFIG_BINDING_SERVICE healthcheck: interval: 10s timeout: 5s retries: 2 test: ${HV_VES_HEALTHCHECK_CMD} volumes: - - ./ssl/:/etc/ves-hv/ + - ./collector/:/etc/hv-ves/ depends_on: - config-binding-service - kafka @@ -99,21 +97,19 @@ services: ports: - "7060:6060" - "7061:6061/tcp" - command: ["--listen-port", "6061", - "--kafka-bootstrap-servers", "kafka:9092", - "--ssl-disable"] + command: ["--configuration-file", "/etc/hv-ves/configuration/insecure.json"] environment: - JAVA_OPTS: "-Dio.netty.leakDetection.level=paranoid" - CONSUL_HOST: "consul-server" - CONFIG_BINDING_SERVICE: "cbs" - HOSTNAME: "dcae-hv-ves-collector" + - JAVA_OPTS + - HOSTNAME=${HV_VES_HOSTNAME} + - CONSUL_HOST + - CONFIG_BINDING_SERVICE healthcheck: interval: 10s timeout: 5s retries: 2 test: ${HV_VES_HEALTHCHECK_CMD} volumes: - - ./ssl/:/etc/ves-hv/ + - ./collector/:/etc/hv-ves/ depends_on: - config-binding-service - kafka @@ -133,7 +129,5 @@ services: depends_on: - kafka networks: - ves-hv-default: - aliases: - - dcae-app-simulator + - ves-hv-default diff --git a/plans/dcaegen2-collectors-hv-ves/testsuites/setup.sh b/plans/dcaegen2-collectors-hv-ves/testsuites/setup.sh index 587b2680..0925e3b6 100755 --- a/plans/dcaegen2-collectors-hv-ves/testsuites/setup.sh +++ b/plans/dcaegen2-collectors-hv-ves/testsuites/setup.sh @@ -29,9 +29,9 @@ export CONTAINERS_NETWORK=ves-hv-default echo "Creating network for containers: ${CONTAINERS_NETWORK}" docker network create ${CONTAINERS_NETWORK} -cd ssl +cd collector/ssl ./gen-certs.sh -cd .. +cd ../.. docker-compose up -d diff --git a/plans/dcaegen2-collectors-hv-ves/testsuites/teardown.sh b/plans/dcaegen2-collectors-hv-ves/testsuites/teardown.sh index fe922ed0..28f10334 100755 --- a/plans/dcaegen2-collectors-hv-ves/testsuites/teardown.sh +++ b/plans/dcaegen2-collectors-hv-ves/testsuites/teardown.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -cd ssl +cd collector/ssl ./gen-certs.sh clean -cd .. +cd ../.. COMPOSE_LOGS_FILE=${WORKSPACE}/archives/containers_logs/docker-compose.log docker-compose logs > ${COMPOSE_LOGS_FILE} diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/libraries/XnfSimulatorLibrary.py b/tests/dcaegen2-collectors-hv-ves/testcases/libraries/XnfSimulatorLibrary.py index 06bd42ea..6c95743d 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/libraries/XnfSimulatorLibrary.py +++ b/tests/dcaegen2-collectors-hv-ves/testcases/libraries/XnfSimulatorLibrary.py @@ -11,7 +11,7 @@ SIMULATOR_IMAGE_NAME = HV_VES_COLLECTOR_NAMESPACE + "/" + HV_VES_GROUP_ID + ".hv HV_VES_VERSION="1.1-SNAPSHOT" SIMULATOR_IMAGE_FULL_NAME = os.getenv("DOCKER_REGISTRY_PREFIX") + SIMULATOR_IMAGE_NAME + ":" + HV_VES_VERSION WORKSPACE_ENV = os.getenv("WORKSPACE") -certificates_dir_path = WORKSPACE_ENV + "/plans/dcaegen2-collectors-hv-ves/testsuites/ssl/" +certificates_dir_path = WORKSPACE_ENV + "/plans/dcaegen2-collectors-hv-ves/testsuites/collector/ssl/" collector_certs_lookup_dir = "/etc/ves-hv/" ONE_SECOND_IN_NANOS = 10 ** 9 |