diff options
author | grabinsk <maciej.grabinski@nokia.com> | 2019-06-19 14:46:15 +0200 |
---|---|---|
committer | grabinsk <maciej.grabinski@nokia.com> | 2019-06-19 14:46:15 +0200 |
commit | 01d354e17b157d8a83e82ea224fabceb07966b7b (patch) | |
tree | fd92bfa63ddd9518bbefe7e8dfb388ea25334397 /tests/dcaegen2/prh-testcases/resources | |
parent | c68c2eefd7980e797c6c4d913d1db4e0b685f48a (diff) |
Add test for scheduled CBS configuration refresh in PRH
Change-Id: Ib90594b6e854d6f576fe3f3ce3b1f7e839bcf3f6
Issue-ID: DCAEGEN2-1544
Signed-off-by: grabinsk <maciej.grabinski@nokia.com>
Diffstat (limited to 'tests/dcaegen2/prh-testcases/resources')
-rw-r--r-- | tests/dcaegen2/prh-testcases/resources/docker-compose.yml | 1 | ||||
-rw-r--r-- | tests/dcaegen2/prh-testcases/resources/prh_config_tests.robot | 19 |
2 files changed, 19 insertions, 1 deletions
diff --git a/tests/dcaegen2/prh-testcases/resources/docker-compose.yml b/tests/dcaegen2/prh-testcases/resources/docker-compose.yml index f8472a5d..2ca2c8d5 100644 --- a/tests/dcaegen2/prh-testcases/resources/docker-compose.yml +++ b/tests/dcaegen2/prh-testcases/resources/docker-compose.yml @@ -54,6 +54,7 @@ services: image: consul:1.0.6 restart: on-failure command: ["kv", "put", "-http-addr=http://consul:8500", "dcae-prh", '{ + "cbs.updates-interval": 0, "logging.level.org.onap.dcaegen2.services.prh": "debug", "logging.level.org.onap.dcaegen2.services.sdk": "debug", "dmaap.dmaapConsumerConfiguration.dmaapUserName":"admin", diff --git a/tests/dcaegen2/prh-testcases/resources/prh_config_tests.robot b/tests/dcaegen2/prh-testcases/resources/prh_config_tests.robot index 54c58f2b..9044185d 100644 --- a/tests/dcaegen2/prh-testcases/resources/prh_config_tests.robot +++ b/tests/dcaegen2/prh-testcases/resources/prh_config_tests.robot @@ -6,7 +6,7 @@ Library Collections *** Keywords *** Verify PRH configuration forced refresh - ${some_random_value} evaluate random.randint(sys.maxint/10, sys.maxint) modules=random,sys + ${some_random_value}= Generate random value Put key-value to consul foo_${some_random_value} bar_${some_random_value} Force PRH config refresh Check key-value in PRH app environment foo_${some_random_value} bar_${some_random_value} @@ -34,3 +34,20 @@ Check key-value in PRH app environment should be equal as integers ${env_response.status_code} 200 log ${env_response.content} should be equal ${env_response.json()["property"]["value"]} ${expected_value} + +Verify scheduled CBS config updates + Set scheduled CBS updates interval 1s + ${some_random_value}= Generate random value + Put key-value to consul spam_${some_random_value} ham_${some_random_value} + wait until keyword succeeds 20x 500ms + ... Check key-value in PRH app environment spam_${some_random_value} ham_${some_random_value} + [Teardown] Set scheduled CBS updates interval 0 + +Set scheduled CBS updates interval + [Arguments] ${cbs_updates_interval} + Put key-value to consul cbs.updates-interval ${cbs_updates_interval} + Force PRH config refresh + +Generate random value + ${some_random_value} evaluate random.randint(sys.maxint/10, sys.maxint) modules=random,sys + [Return] ${some_random_value}
\ No newline at end of file |