blob: e19f91ca94b079789c5fbc2c66a4957e7c1e4ff2 [file] [log] [blame]
grabinskad1421e2019-06-21 15:08:21 +02001*** Settings ***
2Documentation Tests related to updating PRH app config based on CBS config
Remigiusz Janeczekee726142021-08-25 13:29:02 +02003Suite Setup Run keywords Create sessions AND Set default PRH config
grabinskad1421e2019-06-21 15:08:21 +02004Resource resources/prh_sessions.robot
5Resource resources/prh_config_library.robot
6Resource resources/prh_library.robot
7Test Timeout 15 seconds
8
9*** Test Cases ***
10CBS configuration forced refresh
11 [Documentation] It should be possible to force refresh PRH configuration from CBS
12 [Tags] PRH coniguration
13 ${some_random_value}= Generate random value
Remigiusz Janeczekee726142021-08-25 13:29:02 +020014 Put key-value to config foo_${some_random_value} bar_${some_random_value}
grabinskad1421e2019-06-21 15:08:21 +020015 Force PRH config refresh
16 Check key-value in PRH app environment foo_${some_random_value} bar_${some_random_value}
17
18CBS configuration scheduled refresh
19 [Documentation] PRH should pull for CBS configuration updates according to schedule
20 [Tags] PRH coniguration
Remigiusz Janeczekee726142021-08-25 13:29:02 +020021 Set scheduled config updates interval 1s
grabinskad1421e2019-06-21 15:08:21 +020022 ${some_random_value}= Generate random value
Remigiusz Janeczekee726142021-08-25 13:29:02 +020023 Put key-value to config spam_${some_random_value} ham_${some_random_value}
grabinskad1421e2019-06-21 15:08:21 +020024 wait until keyword succeeds 20x 500ms
25 ... Check key-value in PRH app environment spam_${some_random_value} ham_${some_random_value}
Remigiusz Janeczekee726142021-08-25 13:29:02 +020026 [Teardown] Set scheduled config updates interval 0
grabinskad1421e2019-06-21 15:08:21 +020027
28PRH log level change based on CBS config
29 [Documentation] It should be possible to change logging levels in PRH based on entries in CBS
30 [Tags] PRH coniguration logging
Remigiusz Janeczekee726142021-08-25 13:29:02 +020031 Set logging level in config org.onap.dcaegen2.services.prh.foo WARN
grabinskad1421e2019-06-21 15:08:21 +020032 Force PRH config refresh
Remigiusz Janeczekee726142021-08-25 13:29:02 +020033 Verify logging level org.onap.dcaegen2.services.prh.foo WARN