util

package
v2.1.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2020 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RetryInterval        = time.Second * 5
	Timeout              = time.Second * 90
	CleanupRetryInterval = time.Second * 1
	CleanupTimeout       = time.Second * 15
)

Time constants.

View Source
const TestClusterCRName string = "example-storageos"

TestClusterCRName is the name of StorageOSCluster CR used in the tests.

Variables

This section is empty.

Functions

func CSIDriverResourceTest

func CSIDriverResourceTest(t *testing.T, driverName string)

CSIDriverResourceTest checks if the CSIDriver resource is created. In k8s 1.14+, CSIDriver is created as part of the cluster deployment.

func ClusterStatusCheck

func ClusterStatusCheck(t *testing.T, status storageos.StorageOSClusterStatus, nodes int)

ClusterStatusCheck checks the values of cluster status based on a given number of nodes.

func DeployCluster

func DeployCluster(t *testing.T, ctx *framework.TestCtx, cluster *storageos.StorageOSCluster) error

DeployCluster creates a custom resource and checks if the storageos daemonset is deployed successfully.

func DeployNFSServer

func DeployNFSServer(t *testing.T, ctx *framework.TestCtx, nfsServer *storageos.NFSServer) error

DeployNFSServer creates a custom resource and checks if the NFS Server statefulset is deployed successfully.

func NFSServerTest

func NFSServerTest(t *testing.T, ctx *framework.TestCtx)

NFSServerTest creates a new NFSServer resource and checks if the resource is created and ready.

func NewNFSServer

func NewNFSServer(namespace string, nfsServerSpec storageos.NFSServerSpec) *storageos.NFSServer

NewNFSServer returns a NFSServer object, created using a given NFS server spec.

func NewStorageOSCluster

func NewStorageOSCluster(namespace string, clusterSpec storageos.StorageOSClusterSpec) *storageos.StorageOSCluster

NewStorageOSCluster returns a StorageOSCluster object, created using a given cluster spec.

func NodeLabelSyncTest

func NodeLabelSyncTest(t *testing.T, kubeclient kubernetes.Interface)

NodeLabelSyncTest adds a new label to k8s node and checks if the label is synced to the storageos node labels.

func PodSchedulerAdmissionControllerTest

func PodSchedulerAdmissionControllerTest(t *testing.T, ctx *framework.TestCtx)

PodSchedulerAdmissionControllerTest checks if the pod scheduler mutating admission controller mutates the scheduler name of a pod by creates a pvc backed by StorageOS and a pod that uses the PVC. NOTE: This test has a minimum k8s version requirement.

func SetupOperator

func SetupOperator(t *testing.T, ctx *framework.TestCtx)

SetupOperator installs the operator and ensures that the deployment is successful.

func StorageOSClusterCRAttributesTest

func StorageOSClusterCRAttributesTest(t *testing.T, crName string, crNamespace string)

StorageOSClusterCRAttributesTest fetches a StorageOSCluster CR object and checks if the CR properties are unset.

func WaitForDaemonSet added in v0.0.8

func WaitForDaemonSet(t *testing.T, kubeclient kubernetes.Interface, namespace, name string, retryInterval, timeout time.Duration) error

WaitForDaemonSet checks and waits for a given daemonset to be in ready.

func WaitForStatefulSet added in v0.0.8

func WaitForStatefulSet(t *testing.T, kubeclient kubernetes.Interface, namespace, name string, retryInterval, timeout time.Duration) error

WaitForStatefulSet checks and waits for a given statefulset to be in ready.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL