def test_submit_validator_passes(self): resources = job_util.JobResources( logging=param_util.LoggingParam('gs://buck/logs', PG)) param_util.validate_submit_args_or_fail(job_resources=resources, all_task_data=self.task_data, provider_name='MYPROVIDER', input_providers=[PG], output_providers=[PG], logging_providers=[PG])
def test_submit_validator_fails(self, name, path, inwl, outwl, logwl): resources = job_util.JobResources( logging=param_util.LoggingParam('gs://buck/logs', PG)) err_expected = 'Unsupported %s path (%s) for provider' % (name, path) with self.assertRaisesRegexp(ValueError, re.escape(err_expected)): param_util.validate_submit_args_or_fail( job_resources=resources, all_task_data=self.task_data, provider_name='MYPROVIDER', input_providers=inwl, output_providers=outwl, logging_providers=logwl)
def test_submit_validator_passes(self): resources = job_util.JobResources(logging=param_util.LoggingParam( 'gs://buck/logs', param_util.P_GCS)) param_util.validate_submit_args_or_fail( job_resources=resources, job_data={ 'inputs': [], 'outputs': [] }, all_task_data=TASK_DATA, provider_name='MYPROVIDER', input_providers=[param_util.P_GCS], output_providers=[param_util.P_GCS], logging_providers=[param_util.P_GCS])