testshift.cluster

Module Contents

class testshift.cluster.Cluster(kubeconfig)

Bases: object

Cluster is the actual object that gets passed down to all test cases that define it as argument (fixture) and provides access to all resources and modules.

Parameters

kubeconfig (str) – Path to the kubeconfig file.

kubeconfig

Path to the kubeconfig file.

Type

str

Raises

AttributeError – When either a resource or a module is not found.

Examples

Defining the test cases using the cluster fixture as follows:

def my_new_test_case(cluster):
    kernel = cluster.Kernel("node00")

def my_other_fancy_test_case(cluster):
    pods = cluster.Pod(label_selector="app=myapp")
classmethod get_cluster(cls, cluster, kubeconfig)
connect(self)
node(self, node_name)
testshift.cluster.get_cluster