def _complete_submission(update_submission): Progress.report('Completing update submission...') update_submission.complete() WaitFor(update_submission.bundles).to_return_any_value() update_bundle_uuids = update_submission.bundles() Progress.report(f'Updated bundles {update_bundle_uuids}') return update_bundle_uuids
def _wait_for_analysis_workflows(self): if not self.analysis_agent: Progress.report( "NO CREDENTIALS PROVIDED FOR ANALYSIS AGENT, SKIPPING WORKFLOW(s) CHECK..." ) else: Progress.report( "WAITING FOR UPDATED ANALYSIS WORKFLOW(s) TO ABORT...") WaitFor( self._count_aborted_analysis_workflows_and_report ).to_return_value(value=self.expected_update_workflow_count)
def _run_update_test(self, runner, *args, **kwargs): # given: original_submission = runner.submission_envelope # when: update_submission = self._do_update_submission(runner, original_submission) Progress.report( f"UPDATE submission ID is {update_submission.envelope_id}\n") Progress.report('Checking validation status of update submission...') WaitFor(update_submission.check_validation).to_return_value(True) # then: update_bundle_uuids = self._complete_submission(update_submission) Progress.report(f'Bundle UUIDs {update_bundle_uuids}.') self.analysis_agent = runner.analysis_agent self.primary_bundle = runner.primary_bundle_uuids[0] self.analysis_workflow_set = set([]) self.expected_update_workflow_count = 1 self._wait_for_analysis_workflows()
def wait_for_envelope_to_complete(self): Progress.report("WAIT FOR COMPLETE...") WaitFor(self._envelope_is_in_state, 'Complete').to_return_value(value=True) Progress.report(" envelope is in Complete.\n")
def wait_for_envelope_to_be_in_draft(self): Progress.report("WAIT FOR VALIDATION...") WaitFor(self._envelope_is_in_state, 'Draft').to_return_value(value=True) Progress.report(" envelope is in Draft.\n")
def wait_for_envelope_to_be_submitted(self): Progress.report("WAIT FOR SUBMITTED...") WaitFor(self._envelope_is_in_state, 'Submitted').to_return_value(value=True) Progress.report(" envelope is submitted.\n")
def wait_for_envelope_to_be_validated(self): Progress.report("WAIT FOR VALIDATION...") WaitFor(self._envelope_is_in_state, 'Valid').to_return_value(value=True) Progress.report(" envelope is valid.\n")
def get_upload_area_credentials(self): Progress.report("WAITING FOR STAGING AREA...") self.upload_credentials = WaitFor( self._get_upload_area_credentials).to_return_a_value_other_than( other_than_value=None, timeout_seconds=2 * MINUTE) Progress.report(" credentials received.\n")