summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDR695H <dr695h@att.com>2019-07-29 14:50:13 -0400
committerDR695H <dr695h@att.com>2019-07-29 14:50:13 -0400
commite74c39b9728a5f3bb949e2c0927259d9059650ab (patch)
tree5653ed31bb41eef386782f4a26c91f6d4d54f6bf
parent7ad3fbdb3ae959261f48073ce24de289516d5b26 (diff)
correcting the looping check
Issue-ID: TEST-174 Change-Id: Ib971213c3a611c959adf03fde08b33b27045b08c Signed-off-by: DR695H <dr695h@att.com>
-rw-r--r--robotframework-onap/ONAPLibrary/RequestSOKeywords.py5
1 files 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")