blob: 2a6b815474f2d2859a5c3e20f28a7aadfa92a804 [file] [log] [blame]
grabinskad1421e2019-06-21 15:08:21 +02001*** Settings ***
2Documentation Tests related to updating PRH app config based on CBS config
grabinskd28f36b2019-06-26 14:19:04 +02003Suite Setup Create sessions
4Suite Teardown Set default PRH CBS config
grabinskad1421e2019-06-21 15:08:21 +02005Resource resources/prh_sessions.robot
6Resource resources/prh_config_library.robot
7Resource resources/prh_library.robot
8Test Timeout 15 seconds
9
10*** Test Cases ***
11CBS configuration forced refresh
12 [Documentation] It should be possible to force refresh PRH configuration from CBS
13 [Tags] PRH coniguration
14 ${some_random_value}= Generate random value
15 Put key-value to consul foo_${some_random_value} bar_${some_random_value}
16 Force PRH config refresh
17 Check key-value in PRH app environment foo_${some_random_value} bar_${some_random_value}
18
19CBS configuration scheduled refresh
20 [Documentation] PRH should pull for CBS configuration updates according to schedule
21 [Tags] PRH coniguration
22 Set scheduled CBS updates interval 1s
23 ${some_random_value}= Generate random value
24 Put key-value to consul spam_${some_random_value} ham_${some_random_value}
25 wait until keyword succeeds 20x 500ms
26 ... Check key-value in PRH app environment spam_${some_random_value} ham_${some_random_value}
27 [Teardown] Set scheduled CBS updates interval 0
28
29PRH log level change based on CBS config
30 [Documentation] It should be possible to change logging levels in PRH based on entries in CBS
31 [Tags] PRH coniguration logging
32 Set logging level in CBS org.onap.dcaegen2.services.prh.foo WARN
33 Force PRH config refresh
34 Verify logging level org.onap.dcaegen2.services.prh.foo WARN