e2eutil

package
v0.0.0-...-ba674e6 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2018 License: MIT Imports: 20 Imported by: 1

Documentation

Overview

Copyright 2018 The sensu-operator Authors

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateRestoreWaitTime

func CalculateRestoreWaitTime(needDataClone bool) int

func CreateCluster

func CreateCluster(t *testing.T, crClient versioned.Interface, namespace string, cl *api.SensuCluster) (*api.SensuCluster, error)

func DeleteCluster

func DeleteCluster(t *testing.T, crClient versioned.Interface, kubeClient kubernetes.Interface, cl *api.SensuCluster) error

func DeleteDummyDeployment

func DeleteDummyDeployment(kubecli kubernetes.Interface, nameSpace, name string) error

func DeleteDummyPod

func DeleteDummyPod(kubecli kubernetes.Interface, nameSpace, name string) error

func DeleteSecrets

func DeleteSecrets(kubecli kubernetes.Interface, namespace string, secretNames ...string) error

func KillMembers

func KillMembers(kubecli kubernetes.Interface, namespace string, names ...string) error

func LogfWithTimestamp

func LogfWithTimestamp(t *testing.T, format string, args ...interface{})

func NameLabelSelector

func NameLabelSelector(name string) map[string]string

NameLabelSelector returns a label selector of the form name=<name>

func NewAPINodePortService

func NewAPINodePortService(clusterName, serviceName string) *v1.Service

func NewClientPod

func NewClientPod(service *v1.Service, ns string) *v1.Pod

func NewCluster

func NewCluster(genName string, size int) *api.SensuCluster

func NewDummyDeployment

func NewDummyDeployment(clusterName string) *appsv1beta1.Deployment

func NewEtcdService

func NewEtcdService(clusterName, serviceName string) *v1.Service

func NewSensuClient

func NewSensuClient(apiURL string) (*client.RestClient, error)

func UpdateCluster

func UpdateCluster(crClient versioned.Interface, cl *api.SensuCluster, maxRetries int, updateFunc k8sutil.SensuClusterCRUpdateFunc) (*api.SensuCluster, error)

func WaitForPodCondition

func WaitForPodCondition(t *testing.T, kubecli kubernetes.Interface, ns string, podName string, timeout time.Duration, condition podCondition) error

func WaitPodsDeleted

func WaitPodsDeleted(kubecli kubernetes.Interface, namespace string, retries int, lo metav1.ListOptions) ([]*v1.Pod, error)

func WaitPodsDeletedCompletely

func WaitPodsDeletedCompletely(kubecli kubernetes.Interface, namespace string, retries int, lo metav1.ListOptions) ([]*v1.Pod, error)

func WaitPodsWithImageDeleted

func WaitPodsWithImageDeleted(kubecli kubernetes.Interface, namespace, image string, retries int, lo metav1.ListOptions) ([]*v1.Pod, error)

func WaitSizeAndVersionReached

func WaitSizeAndVersionReached(t *testing.T, kubeClient kubernetes.Interface, version string, size, retries int, cl *api.SensuCluster) error

func WaitUntilMembersWithNamesDeleted

func WaitUntilMembersWithNamesDeleted(t *testing.T, crClient versioned.Interface, retries int, cl *api.SensuCluster, targetNames ...string) ([]string, error)

func WaitUntilOperatorReady

func WaitUntilOperatorReady(kubecli kubernetes.Interface, namespace, name string) error

WaitUntilOperatorReady will wait until the first pod selected for the label name=sensu-operator is ready.

func WaitUntilPodSizeReached

func WaitUntilPodSizeReached(t *testing.T, kubeClient kubernetes.Interface, size, retries int, cl *api.SensuCluster) ([]string, error)

func WaitUntilPodSuccess

func WaitUntilPodSuccess(t *testing.T, kubecli kubernetes.Interface, pod *v1.Pod, namespace string, timeout time.Duration) error

func WaitUntilSizeReached

func WaitUntilSizeReached(t *testing.T, crClient versioned.Interface, size, retries int, cl *api.SensuCluster) ([]string, error)

Types

type StorageCheckerOptions

type StorageCheckerOptions struct {
	S3Cli          *s3.S3
	S3Bucket       string
	DeletedFromAPI bool
}

Jump to

Keyboard shortcuts

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