Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update final verified state check in OOB BCW test #219

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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