Exemple #1
0
    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']
Exemple #2
0
    def setup(self):
        self.obj = self.get_object()
        self.obj.save()

        self.auth_header = auth_header(self.client)
        self.namespace = self.auth_header['X-Test-Namespace']
        self.urls = self.get_urls()
    def setup(self):
        self.auth_header = auth_header(self.client)
        self.namespace = self.auth_header['X-Test-Namespace']
        self.user = User.load(None, self.auth_header['X-User'])

        self.provisioner_id = None
Exemple #4
0
    def setup(self):
        self.obj = self.get_object()
        self.obj.save()

        self.auth_header = auth_header(self.client)
        self.urls = self.get_urls()