diff options
author | 2019-06-17 14:08:27 +0200 | |
---|---|---|
committer | 2019-06-18 07:18:58 +0000 | |
commit | 9c7d8f024060f441ba25c14a04fd841f2e9e16bf (patch) | |
tree | 5c98bf3e6cc0b2c0e1d3b6fb20dcd2278bc5617c /tests/dcaegen2/prh-testcases/resources/prh_library.robot | |
parent | 85449f00062a6b05f7d627898f80ac306faeded2 (diff) |
add log level change test
Change-Id: Ie4fb5192a86e4433df865c8913ea212d25acc00b
Issue-ID: INT-1107
Signed-off-by: micdzied <michal.1.dziedzic@nokia.com>
Diffstat (limited to 'tests/dcaegen2/prh-testcases/resources/prh_library.robot')
-rw-r--r-- | tests/dcaegen2/prh-testcases/resources/prh_library.robot | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/tests/dcaegen2/prh-testcases/resources/prh_library.robot b/tests/dcaegen2/prh-testcases/resources/prh_library.robot index 007caf37..ce5b65bf 100644 --- a/tests/dcaegen2/prh-testcases/resources/prh_library.robot +++ b/tests/dcaegen2/prh-testcases/resources/prh_library.robot @@ -2,6 +2,7 @@ Library RequestsLibrary Library Collections Library PrhLibrary.py +Library OperatingSystem Resource ../../../common.robot *** Keywords *** @@ -143,6 +144,8 @@ Create sessions Set Suite Variable ${aai_setup_session} aai_setup_session Create Session consul_setup_session ${CONSUL_SETUP_URL} Set Suite Variable ${consul_setup_session} consul_setup_session + Create Session prh_setup_session ${PRH_SETUP_URL} + Set Suite Variable ${prh_setup_session} prh_setup_session Reset Simulators Reset AAI simulator @@ -158,4 +161,23 @@ Reset DMaaP simulator Create headers ${headers}= Create Dictionary Accept=application/json Content-Type=application/json - Set Suite Variable ${suite_headers} ${headers}
\ No newline at end of file + Set Suite Variable ${suite_headers} ${headers} + +Verify change logging level + Change logging level TRACE + Verify logs with heartbeat + Change logging level INFO + +Change logging level + [Arguments] ${expected_log_level} + Run curl -i -X POST -H 'Content-Type: application/json' -d '{"configuredLevel": "${expected_log_level}"}' http://localhost:8100/actuator/loggers/org.onap.dcaegen2.services.prh + +Verify logging level + [Arguments] ${expected_log_level} + ${resp}= Get Request prh_setup_session /actuator/loggers/org.onap.dcaegen2.services.prh + Should Be Equal As JSON ${resp.content} ${expected_log_level} + +Verify logs with heartbeat + Verify logging level ${TRACE_LOG_LEVEL_CONF} + Get Request prh_setup_session /heartbeat + Check PRH log Heartbeat request received
\ No newline at end of file |