diff options
Diffstat (limited to 'tests/dcaegen2/prh-testcases/resources/prh_library.robot')
-rw-r--r-- | tests/dcaegen2/prh-testcases/resources/prh_library.robot | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/tests/dcaegen2/prh-testcases/resources/prh_library.robot b/tests/dcaegen2/prh-testcases/resources/prh_library.robot index baf3a8c5..3ed377c7 100644 --- a/tests/dcaegen2/prh-testcases/resources/prh_library.robot +++ b/tests/dcaegen2/prh-testcases/resources/prh_library.robot @@ -2,7 +2,6 @@ Library RequestsLibrary Library Collections Library PrhLibrary.py -Library OperatingSystem Resource ../../../common.robot *** Keywords *** @@ -152,20 +151,25 @@ Reset DMaaP simulator Verify change logging level - Change logging level TRACE + ${logger}= Set Variable org.onap.dcaegen2.services.prh.controllers.AppInfoController + Change logging level ${logger} TRACE + Verify logging level ${logger} TRACE Verify logs with heartbeat - Change logging level INFO + [Teardown] Change logging level ${logger} 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 + [Arguments] ${logger} ${log_level} + ${request_body}= Create Dictionary configuredLevel=${log_level} + ${resp}= Post Request prh_session /actuator/loggers/${logger} json=${request_body} + Should Be Equal As Integers ${resp.status_code} 204 Verify logging level - [Arguments] ${expected_log_level} - ${resp}= Get Request prh_session /actuator/loggers/org.onap.dcaegen2.services.prh - Should Be Equal As JSON ${resp.content} ${expected_log_level} + [Arguments] ${logger} ${expected_log_level} + ${resp}= Get Request prh_session /actuator/loggers/${logger} + Should Be Equal As Integers ${resp.status_code} 200 + Log ${resp.content} + Should Be Equal As Strings ${resp.json()["configuredLevel"]} ${expected_log_level} ignore_case=true Verify logs with heartbeat - Verify logging level ${TRACE_LOG_LEVEL_CONF} Get Request prh_session /heartbeat Check PRH log Heartbeat request received
\ No newline at end of file |