From e74c39b9728a5f3bb949e2c0927259d9059650ab Mon Sep 17 00:00:00 2001 From: DR695H Date: Mon, 29 Jul 2019 14:50:13 -0400 Subject: correcting the looping check Issue-ID: TEST-174 Change-Id: Ib971213c3a611c959adf03fde08b33b27045b08c Signed-off-by: DR695H --- robotframework-onap/ONAPLibrary/RequestSOKeywords.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/robotframework-onap/ONAPLibrary/RequestSOKeywords.py b/robotframework-onap/ONAPLibrary/RequestSOKeywords.py index 92658db..9dd0977 100644 --- a/robotframework-onap/ONAPLibrary/RequestSOKeywords.py +++ b/robotframework-onap/ONAPLibrary/RequestSOKeywords.py @@ -38,10 +38,11 @@ class RequestSOKeywords(object): # do this until it is done for i in range(tries): resp = self.reqs.get_request("so", endpoint, data_path, auth=auth) - self.builtin.should_not_contain_any(resp.text, fail_states) logger.info(resp.json()['request']['requestStatus']['requestState']) + if resp.json()['request']['requestStatus']['requestState'] in fail_states: + self.builtin.fail("Received failure response from so " + resp.text) if resp.json()['request']['requestStatus']['requestState'] in complete_states: - logger.info("Received response from so " + resp.text) + logger.info("Received complete response from so " + resp.text) return True, resp else: self.builtin.sleep(interval, "Response from SO is not in requested status") -- cgit 1.2.3-korg