integration

package
v0.0.0-...-1a56975 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2019 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateClientset

func CreateClientset(kubeconfig string) (*kubernetes.Clientset, error)

CreateClientset creates a new Clientset for the given kubeconfig.

func DeleteSecret

func DeleteSecret(clientset kubernetes.Interface, namespace string, name string) error

DeleteSecret deletes a secret.

func ExamineSecret

func ExamineSecret(secret *v1.Secret) error

ExamineSecret examines the content of an Istio secret to make sure that * Secret type is correctly set; * Key, certificate and CA root are correctly saved in the data section;

func WaitForSecretExist

func WaitForSecretExist(clientset kubernetes.Interface, namespace string, secretName string,
	timeToWait time.Duration) (*v1.Secret, error)

WaitForSecretExist takes name of a secret and watches the secret. Returns the requested secret if it exists, or error on timeouts.

Types

type CertRotationTestEnv

type CertRotationTestEnv struct {
	framework.TestEnv

	ClientSet *kubernetes.Clientset
	NameSpace string
	Hub       string
	Tag       string
	// contains filtered or unexported fields
}

CertRotationTestEnv is the test environment for CA certificate rotation test

func NewCertRotationTestEnv

func NewCertRotationTestEnv(name, kubeConfig, hub, tag string) *CertRotationTestEnv

NewCertRotationTestEnv creates the environment instance

func (*CertRotationTestEnv) Bringup

func (env *CertRotationTestEnv) Bringup() error

Bringup doing general setup for environment level, not components. Bringup() is called by framework.SetUp()

func (*CertRotationTestEnv) Cleanup

func (env *CertRotationTestEnv) Cleanup() error

Cleanup clean everything created by this test environment, not component level Cleanup() is being called in framework.TearDown()

func (*CertRotationTestEnv) GetComponents

func (env *CertRotationTestEnv) GetComponents() []framework.Component

GetComponents is the key of a environment It defines what components a environment contains. Components will be stored in framework for start and stop

func (*CertRotationTestEnv) GetName

func (env *CertRotationTestEnv) GetName() string

GetName return environment ID

type KubernetesPod

type KubernetesPod struct {
	framework.Component
	// contains filtered or unexported fields
}

KubernetesPod is the test component for K8s pod

func NewKubernetesPod

func NewKubernetesPod(clientset *kubernetes.Clientset, namespace string, name string,
	image string, cmds []string, args []string) *KubernetesPod

NewKubernetesPod create a K8s pod instance

func (*KubernetesPod) GetName

func (c *KubernetesPod) GetName() string

GetName return component name

func (*KubernetesPod) IsAlive

func (c *KubernetesPod) IsAlive() (bool, error)

IsAlive check if component is alive/running

func (*KubernetesPod) Start

func (c *KubernetesPod) Start() (err error)

Start is being called in framework.StartUp()

func (*KubernetesPod) Stop

func (c *KubernetesPod) Stop() (err error)

Stop stop this component Stop is being called in framework.TearDown()

type KubernetesService

type KubernetesService struct {
	framework.Component
	// contains filtered or unexported fields
}

KubernetesService is the test component for K8s service

func NewKubernetesService

func NewKubernetesService(clientset *kubernetes.Clientset, namespace string, name string,
	serviceType v1.ServiceType, port int32, selector map[string]string, annotation map[string]string) *KubernetesService

NewKubernetesService create a K8s service instance

func (*KubernetesService) GetName

func (c *KubernetesService) GetName() string

GetName return component name

func (*KubernetesService) IsAlive

func (c *KubernetesService) IsAlive() (bool, error)

IsAlive checks if the component is alive/running

func (*KubernetesService) Start

func (c *KubernetesService) Start() (err error)

Start is being called in framework.StartUp()

func (*KubernetesService) Stop

func (c *KubernetesService) Stop() (err error)

Stop stop this component Stop is being called in framework.TearDown()

type NodeAgentTestEnv

type NodeAgentTestEnv struct {
	framework.TestEnv

	ClientSet *kubernetes.Clientset
	NameSpace string
	Hub       string
	Tag       string
	// contains filtered or unexported fields
}

NodeAgentTestEnv is the test environment for CA and NodeAgent certificate test

func NewNodeAgentTestEnv

func NewNodeAgentTestEnv(name, kubeConfig, hub, tag string) *NodeAgentTestEnv

NewNodeAgentTestEnv creates the environment instance

func (*NodeAgentTestEnv) Bringup

func (env *NodeAgentTestEnv) Bringup() error

Bringup doing general setup for environment level, not components. Bringup() is called by framework.SetUp()

func (*NodeAgentTestEnv) Cleanup

func (env *NodeAgentTestEnv) Cleanup() error

Cleanup clean everything created by this test environment, not component level Cleanup() is being called in framework.TearDown()

func (*NodeAgentTestEnv) GetComponents

func (env *NodeAgentTestEnv) GetComponents() []framework.Component

GetComponents is the key of a environment It defines what components a environment contains. Components will be stored in framework for start and stop

func (*NodeAgentTestEnv) GetName

func (env *NodeAgentTestEnv) GetName() string

GetName return environment ID

func (*NodeAgentTestEnv) GetNodeAgentIPAddress

func (env *NodeAgentTestEnv) GetNodeAgentIPAddress() (string, error)

GetNodeAgentIPAddress returns the external LoadBalancer IP address of the service

type SecretTestEnv

type SecretTestEnv struct {
	framework.TestEnv

	ClientSet *kubernetes.Clientset
	NameSpace string
	Hub       string
	Tag       string
	// contains filtered or unexported fields
}

SecretTestEnv is the test environment for istio.default secret test

func NewSecretTestEnv

func NewSecretTestEnv(name, kubeConfig, hub, tag string) *SecretTestEnv

NewSecretTestEnv creates the environment instance

func (*SecretTestEnv) Bringup

func (env *SecretTestEnv) Bringup() error

Bringup doing general setup for environment level, not components. Bringup() is called by framework.SetUp()

func (*SecretTestEnv) Cleanup

func (env *SecretTestEnv) Cleanup() error

Cleanup clean everything created by this test environment, not component level Cleanup() is being called in framework.TearDown()

func (*SecretTestEnv) GetComponents

func (env *SecretTestEnv) GetComponents() []framework.Component

GetComponents is the key of a environment It defines what components a environment contains. Components will be stored in framework for start and stop

func (*SecretTestEnv) GetName

func (env *SecretTestEnv) GetName() string

GetName return environment ID

Jump to

Keyboard shortcuts

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