def setUp(self): super(WorkloadTestCase, self).setUp() self.env = db.env_create(self.id(), "INIT", "", {}, {}, {}, []) self.task = db.task_create({"env_uuid": self.env["uuid"]}) self.task_uuid = self.task["uuid"] self.subtask = db.subtask_create(self.task_uuid, title="foo") self.subtask_uuid = self.subtask["uuid"]
def setUp(self): super(WorkloadTestCase, self).setUp() self.deploy = db.deployment_create({}) self.task = db.task_create({"deployment_uuid": self.deploy["uuid"]}) self.task_uuid = self.task["uuid"] self.subtask = db.subtask_create(self.task_uuid, title="foo") self.subtask_uuid = self.subtask["uuid"]
def setUp(self): super(WorkloadDataTestCase, self).setUp() self.env = db.env_create(self.id(), "INIT", "", {}, {}, {}, []) self.task = db.task_create({"env_uuid": self.env["uuid"]}) self.task_uuid = self.task["uuid"] self.subtask = db.subtask_create(self.task_uuid, title="foo") self.subtask_uuid = self.subtask["uuid"] self.workload = db.workload_create( self.task_uuid, self.subtask_uuid, name="atata", description="foo", position=0, args={}, contexts={}, sla={}, runner={}, runner_type="r", hooks={}) self.workload_uuid = self.workload["uuid"]
def setUp(self): super(WorkloadDataTestCase, self).setUp() self.deploy = db.deployment_create({}) self.task = db.task_create({"deployment_uuid": self.deploy["uuid"]}) self.task_uuid = self.task["uuid"] self.subtask = db.subtask_create(self.task_uuid, title="foo") self.subtask_uuid = self.subtask["uuid"] self.key = {"name": "atata", "description": "tatata", "pos": 0, "kw": {"runner": {"r": "R", "type": "T"}}} self.workload = db.workload_create(self.task_uuid, self.subtask_uuid, self.key) self.workload_uuid = self.workload["uuid"]
def setUp(self): super(WorkloadDataTestCase, self).setUp() self.deploy = db.deployment_create({}) self.task = db.task_create({"deployment_uuid": self.deploy["uuid"]}) self.task_uuid = self.task["uuid"] self.subtask = db.subtask_create(self.task_uuid, title="foo") self.subtask_uuid = self.subtask["uuid"] self.workload = db.workload_create( self.task_uuid, self.subtask_uuid, name="atata", description="foo", position=0, args={}, context={}, sla={}, runner={}, runner_type="r", hooks={}) self.workload_uuid = self.workload["uuid"]
def __init__(self, task=None, fake=False, **attributes): """Task object init :param task: dictionary like object, that represents a task :param fake: if True, will be created task object with random UUID and parameters, passed in 'attributes'. Does not create database record. Used for special purposes, like task config validation. """ self.fake = fake if fake: self.task = task or {"uuid": str(uuid.uuid4())} self.task.update(attributes) else: self.task = task or db.task_create(attributes)
def __init__(self, task=None, temporary=False, **attributes): """Task object init :param task: dictionary like object, that represents a task :param temporary: whenever this param is True the task will be created with a random UUID and no database record. Used for special purposes, like task config validation. """ self.is_temporary = temporary if self.is_temporary: self.task = task or {"uuid": str(uuid.uuid4())} self.task.update(attributes) else: self.task = task or db.task_create(attributes)
def setUp(self): super(WorkloadDataTestCase, self).setUp() self.env = db.env_create(self.id(), "INIT", "", {}, {}, {}, []) self.task = db.task_create({"env_uuid": self.env["uuid"]}) self.task_uuid = self.task["uuid"] self.subtask = db.subtask_create(self.task_uuid, title="foo") self.subtask_uuid = self.subtask["uuid"] self.workload = db.workload_create(self.task_uuid, self.subtask_uuid, name="atata", description="foo", position=0, args={}, contexts={}, sla={}, runner={}, runner_type="r", hooks={}) self.workload_uuid = self.workload["uuid"]
def setUp(self): super(WorkloadDataTestCase, self).setUp() self.deploy = db.deployment_create({}) self.task = db.task_create({"deployment_uuid": self.deploy["uuid"]}) self.task_uuid = self.task["uuid"] self.subtask = db.subtask_create(self.task_uuid, title="foo") self.subtask_uuid = self.subtask["uuid"] self.workload = db.workload_create(self.task_uuid, self.subtask_uuid, name="atata", description="foo", position=0, args={}, contexts={}, sla={}, runner={}, runner_type="r", hooks={}) self.workload_uuid = self.workload["uuid"]
def setUp(self): super(SubtaskTestCase, self).setUp() self.env = db.env_create(self.id(), "INIT", "", {}, {}, {}, []) self.task = db.task_create({"env_uuid": self.env["uuid"]})
def _create_task(self, values=None): values = values or {} if "deployment_uuid" not in values: values["deployment_uuid"] = self.deploy["uuid"] return db.task_create(values)
def setUp(self): super(SubtaskTestCase, self).setUp() self.deploy = db.deployment_create({}) self.task = db.task_create({"deployment_uuid": self.deploy["uuid"]})
def _create_task(self, values=None): values = values or {} if "env_uuid" not in values: values["env_uuid"] = self.env["uuid"] return db.task_create(values)