Exemple #1
0
 def test_build_action_run_collection(self):
     collection = ActionRunFactory.build_action_run_collection(self.job_run)
     assert_equal(collection.action_graph, self.action_graph)
     assert_in('act1', collection.run_map)
     assert_in('act2', collection.run_map)
     assert_length(collection.run_map, 2)
     assert_equal(collection.run_map['act1'].action_name, 'act1')
Exemple #2
0
    def for_job(cls, job, run_num, run_time, node, manual):
        """Create a JobRun for a job."""
        run = cls(job.name, run_num, run_time, node, job.output_path.clone(),
                job.context, action_graph=job.action_graph, manual=manual)

        action_runs     = ActionRunFactory.build_action_run_collection(run)
        run.action_runs = action_runs
        return run
Exemple #3
0
 def test_build_action_run_collection(self):
     collection = ActionRunFactory.build_action_run_collection(
         self.job_run, self.action_runner)
     assert_equal(collection.action_graph, self.action_graph)
     assert_in('act1', collection.run_map)
     assert_in('act2', collection.run_map)
     assert_length(collection.run_map, 2)
     assert_equal(collection.run_map['act1'].action_name, 'act1')
Exemple #4
0
    def for_job(cls, job, run_num, run_time, node, manual):
        """Create a JobRun for a job."""
        run = cls(job.get_name(),
                  run_num,
                  run_time,
                  node,
                  job.output_path.clone(),
                  job.context,
                  action_graph=job.action_graph,
                  manual=manual)

        action_runs = ActionRunFactory.build_action_run_collection(
            run, job.action_runner)
        run.action_runs = action_runs
        return run