Skip to content

Commit

Permalink
Merge pull request #219 from nodlesh/fix-connectionless-oob-tests
Browse files Browse the repository at this point in the history
update final verified state check in OOB BCW test
  • Loading branch information
nodlesh authored Dec 4, 2023
2 parents 92d4104 + 044a66a commit 0e88680
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions aries-mobile-tests/agent_controller_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,15 @@ def expected_agent_proof_state(agent_url, thread_id, status_txt, wait_time=2.0,
(resp_status, resp_text) = agent_controller_GET(agent_url + "/agent/command/", "proof", id=thread_id)
if resp_status == 200:
resp_json = json.loads(resp_text)
verified = resp_json["verified"]
if verified in status_txt:
return True
# if "verified" is not in resp_json, then it hasn't been verified yet, loop.
if "verified" in resp_json:
verified = resp_json["verified"]
if verified in status_txt:
return True
else:
print("Proof not verified on attempt", i, "of", int(wait_time), "sleeping for", sleep_time, "seconds")
# print formated json
print(json.dumps(resp_json, indent=4))
sleep(sleep_time)

print("From", agent_url, "Expected state", status_txt, "but received", verified, ", with a response status of", resp_status)
Expand Down

0 comments on commit 0e88680

Please sign in to comment.