tests

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: Apache-2.0 Imports: 35 Imported by: 0

README

Dynamic NFS Provisioner BDD

Dynamic NFS Provisioner BDD tests are developed using ginkgo & gomega libraries.

How to run the tests?

Pre-requisites
  • Install Ginkgo and Gomega on your development machine.

    $ go get github.com/onsi/ginkgo/ginkgo
    $ go get github.com/onsi/gomega/...
    
  • Get your Kubernetes Cluster ready and make sure you can run kubectl from your development machine. Note down the path to the kubeconfig file used by kubectl to access your cluster. Example: /home//.kube/config

  • (Optional) Set the KUBECONFIG environment variable on your development machine to point to the kubeconfig file. Example: KUBECONFIG=/home//.kube/config

    If you do not set this ENV, you will have to pass the file to the ginkgo CLI

  • Install required OpenEBS components. Example: kubectl apply -f openebs-operator.yaml

Run tests
  • Run the tests by being in the localpv tests folder. $ cd $GOPATH/src/github.com/openebs/dynamic-nfs-provisioner/tests/ $ ginkgo -v --

    In case the KUBECONFIG env is not configured, you can run: $ ginkgo -v -- -kubeconfig=/path/to/kubeconfig

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KubeClient

type KubeClient struct {
	kubernetes.Interface
	// contains filtered or unexported fields
}

KubeClient interface for k8s API

var (
	// Client for KubeClient
	Client *KubeClient
)

func (*KubeClient) Exec

func (k *KubeClient) Exec(command []string, pod, container, ns string) (string, string, error)

Exec execute the given command in given ns/pod/container and return the output

func (*KubeClient) WaitForNamespaceCleanup

func (k *KubeClient) WaitForNamespaceCleanup(ns string) error

WaitForNamespaceCleanup wait for cleanup of the given namespace

Jump to

Keyboard shortcuts

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