e2e

package
v0.0.0-...-b3ec277 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IPEqual

func IPEqual(s, t string) bool

IPEqual reports whether ip and x are the same IP address

func Logf

func Logf(format string, a ...interface{})

Logf write log to ginkgo output

func RandString

func RandString(n int) string

RandString create a random string

Types

type Framework

type Framework struct {
	Client      *kubernetes.Clientset
	UtilClient  client.Client
	RedisClient redis.Client
	K8sService  k8s.Services
	// contains filtered or unexported fields
}

Framework is e2e test framework

func NewFramework

func NewFramework(name string) *Framework

NewFramework create a new Framework with name

func (*Framework) AfterEach

func (f *Framework) AfterEach()

AfterEach runs after each test

func (*Framework) BeforeEach

func (f *Framework) BeforeEach()

BeforeEach runs before each test

func (*Framework) CreatePod

func (f *Framework) CreatePod(spec *v1.Pod) *v1.Pod

CreatePod creates a pod in test namespace

func (*Framework) CreatePodAndWaitRunning

func (f *Framework) CreatePodAndWaitRunning(spec *v1.Pod, timeout time.Duration) *v1.Pod

CreatePodAndWaitRunning creates a pod and waiting for it to become Running

func (*Framework) CreateRedisCluster

func (f *Framework) CreateRedisCluster(spec *redisv1beta1.RedisCluster) *redisv1beta1.RedisCluster

CreateRedisCluster creates a RedisCluster in test namespace

func (*Framework) CreateRedisClusterAndWaitHealthy

func (f *Framework) CreateRedisClusterAndWaitHealthy(spec *redisv1beta1.RedisCluster, timeout time.Duration) *redisv1beta1.RedisCluster

CreateRedisClusterAndWaitHealthy creates a RedisCluster and waiting for it to become Healthy

func (*Framework) DeletePod

func (f *Framework) DeletePod(name string)

DeletePod deletes a pod with specified name in test namespace

func (*Framework) DeleteRedisCluster

func (f *Framework) DeleteRedisCluster(name string)

DeleteRedisCluster deletes a RedisCluster with specified name in test namespace

func (*Framework) Logf

func (f *Framework) Logf(format string, a ...interface{})

Logf write log to ginkgo output

func (*Framework) Namespace

func (f *Framework) Namespace() string

Namespace return the test namespace name

func (*Framework) UpdateRedisCluster

func (f *Framework) UpdateRedisCluster(spec *redisv1beta1.RedisCluster) *redisv1beta1.RedisCluster

UpdateRedisCluster update a RedisCluster in test namespace

func (*Framework) WaitJobSuccess

func (f *Framework) WaitJobSuccess(jobName string, timeout time.Duration) error

WaitJobSuccess wait for a job to success or timeout

func (*Framework) WaitPodRunning

func (f *Framework) WaitPodRunning(podName string, timeout time.Duration) (*v1.Pod, error)

WaitPodRunning wait for a status of a pod become running

func (*Framework) WaitRedisclusterHealthy

func (f *Framework) WaitRedisclusterHealthy(name string, wait, timeout time.Duration) (result *redisv1beta1.RedisCluster, err error)

WaitRedisclusterHealthy wait for a status of a RedisCluster become Healthy

Jump to

Keyboard shortcuts

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