Exemplo n.º 1
0
 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])
Exemplo n.º 2
0
 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)
Exemplo n.º 3
0
 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])