Skip to content
Snippets Groups Projects
Commit 96b94f62 authored by Joao Pedro Lopes's avatar Joao Pedro Lopes
Browse files

Tape REST API tests: Introduce archive_poll_list(..) helper function

parent 539a563e
No related branches found
No related tags found
No related merge requests found
......@@ -45,3 +45,22 @@ class GfalWrapper:
# Request still not finished
return 0, errors
def archive_poll_list(self, urls):
errors = self.context.archive_poll(urls)
error_count = 0
ontape_count = 0
for error in errors:
if error is None:
ontape_count += 1
elif error.code != errno.EAGAIN:
error_count += 1
if error_count == len(errors):
return -1, errors
elif ontape_count == len(errors):
return 1, errors
elif (ontape_count + error_count) == len(errors):
return 2, errors
# Request still not finished
return 0, errors
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment