diff options
author | Piotr Marcinkiewicz <piotr.marcinkiewicz@nokia.com> | 2021-09-03 14:57:16 +0200 |
---|---|---|
committer | Piotr Marcinkiewicz <piotr.marcinkiewicz@nokia.com> | 2021-09-07 06:57:15 +0000 |
commit | 1cb88f315b0ead933e8b6051a498daf85271d950 (patch) | |
tree | 1c00a2343a28e2e80b181d25f7b77132301159c1 /test/mocks/datafilecollector-testharness/simulator-group/consul_config.sh | |
parent | ee8669cc6b2dd8591c84dff3ccc4e2394f99fc33 (diff) |
Update DFC tests to use file based conifg
To remove Consul/CBS dependency in DCAE DFC was updated
to use file based configuration
Tests updates:
- file based config use in DFC
- removal of Consul/CBS from DFC tests
- coversion config files from json to yaml
Issue-ID: DCAEGEN2-2692
Signed-off-by: Piotr Marcinkiewicz <piotr.marcinkiewicz@nokia.com>
Change-Id: I7267f99cc1354dee84afc1c187b7e4ca0b89af94
Diffstat (limited to 'test/mocks/datafilecollector-testharness/simulator-group/consul_config.sh')
-rwxr-xr-x | test/mocks/datafilecollector-testharness/simulator-group/consul_config.sh | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/consul_config.sh b/test/mocks/datafilecollector-testharness/simulator-group/consul_config.sh deleted file mode 100755 index 5e8f7e2d4..000000000 --- a/test/mocks/datafilecollector-testharness/simulator-group/consul_config.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -bash -x - -# Script to configure consul with json configuration files with 'localhost' urls. This -# is needed when running the simulator as as a stand-alone app or via a dfc container in 'host' network mode. -# Assuming the input json files hostnames for MR and DR simulators are given as 'mrsim'/'drsim' -# See available consul files in the consul dir -# The script stores a json config for 'dfc_app'<dfc-instance-id>' if arg 'app' is given. -# And for 'dfc_app'<dfc-instance-id>':dmaap' if arg 'dmaap' is given. -# Instance id shall be and integer in the range 0..5 - -. ../common/test_env.sh - -if [ $# != 3 ]; then - echo "Script needs three args, app|dmaap <dfc-instance-id> <json-file-path>" - exit 1 -fi - -if [ $2 -lt 0 ] || [ $2 -gt $DFC_MAX_IDX ]; then - __print_err "dfc-instance-id should be 0.."$DFC_MAX_IDX - exit 1 -fi -if ! [ -f $3 ]; then - __print_err "json file does not extis: "$3 - exit 1 -fi - -echo "Configuring consul for " $appname " from " $3 -curl -s http://127.0.0.1:${CONSUL_PORT}/v1/kv/${appname}?dc=dc1 -X PUT -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' --data-binary "@"$3 - -echo "Reading back from consul:" -curl "http://127.0.0.1:${CONSUL_PORT}/v1/kv/${appname}?dc=dc1&raw=0" - -echo "done"
\ No newline at end of file |