def setup(self): _user = user() create_kwargs_provisioner = { 'name': 'Testing manual', 'engine': 'kqueen.engines.ManualEngine', 'parameters': PROVISIONER_PARAMETERS, 'owner': _user } prov = Provisioner(_user.namespace, **create_kwargs_provisioner) prov.save(check_status=False) self.create_kwargs_cluster = { 'name': 'Testing cluster for manual provisioner', 'provisioner': prov, 'state': 'deployed', 'kubeconfig': KUBECONFIG, 'metadata': CLUSTER_METADATA, 'owner': _user } self.cluster = Cluster.create(_user.namespace, **self.create_kwargs_cluster) self.engine = ManualEngine(cluster=self.cluster) # client setup self.auth_header = auth_header(self.client) self.namespace = self.auth_header['X-Test-Namespace']
def get_object(self): return user()
def setup(self): self.obj = cluster() self.obj.save() self.user = user()