e2e

package
v1.6.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2017 License: Apache-2.0 Imports: 134 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ADD    = "ADD"
	DEL    = "DEL"
	UPDATE = "UPDATE"
)
View Source
const (
	MinSaturationThreshold     = 2 * time.Minute
	MinPodsPerSecondThroughput = 8
	DensityPollInterval        = 10 * time.Second
)
View Source
const (
	DNSdefaultTimeout      = 5 * time.Minute
	ClusterAddonLabelKey   = "k8s-app"
	DNSLabelName           = "kube-dns"
	DNSAutoscalerLabelName = "kube-dns-autoscaler"
)
View Source
const (
	MinNodes         = 2
	NodeStateTimeout = 1 * time.Minute
)
View Source
const (
	NfsServerImage       string = "gcr.io/google_containers/volume-nfs:0.8"
	IscsiServerImage     string = "gcr.io/google_containers/volume-iscsi:0.1"
	GlusterfsServerImage string = "gcr.io/google_containers/volume-gluster:0.2"
	CephServerImage      string = "gcr.io/google_containers/volume-ceph:0.1"
	RbdServerImage       string = "gcr.io/google_containers/volume-rbd:0.1"
)

Current supported images for e2e volume testing to be assigned to VolumeTestConfig.serverImage

View Source
const (

	// IP src range from which the GCE L7 performs health checks.
	GCEL7SrcRange = "130.211.0.0/22"
)

Variables

View Source
var (
	CronJobGroupVersionResource      = schema.GroupVersionResource{Group: batch.GroupName, Version: "v2alpha1", Resource: "cronjobs"}
	ScheduledJobGroupVersionResource = schema.GroupVersionResource{Group: batch.GroupName, Version: "v2alpha1", Resource: "scheduledjobs"}
	BatchV2Alpha1GroupVersion        = schema.GroupVersion{Group: batch.GroupName, Version: "v2alpha1"}
)
View Source
var MaxContainerFailures = 0

Maximum container failures this test tolerates before failing.

Functions

func CheckCadvisorHealthOnAllNodes added in v0.11.0

func CheckCadvisorHealthOnAllNodes(c clientset.Interface, timeout time.Duration)

func ClusterLevelLoggingWithKibana added in v1.0.0

func ClusterLevelLoggingWithKibana(f *framework.Framework)

ClusterLevelLoggingWithKibana is an end to end test that checks to see if Kibana is alive.

func CreateHostPortPods added in v1.3.0

func CreateHostPortPods(f *framework.Framework, id string, replicas int, expectRunning bool)

func CreateNamespaces added in v1.5.0

func CreateNamespaces(f *framework.Framework, namespaceCount int, namePrefix string) ([]*v1.Namespace, error)

func CreateNodeSelectorPods added in v1.3.0

func CreateNodeSelectorPods(f *framework.Framework, id string, replicas int, nodeSelector map[string]string, expectRunning bool)

func GetGroupNodes added in v1.3.0

func GetGroupNodes(group string) ([]string, error)

func GroupSize added in v1.3.0

func GroupSize(group string) (int, error)

func LoadAppArmorProfiles

func LoadAppArmorProfiles(f *framework.Framework)

func NewRestartConfig added in v1.1.0

func NewRestartConfig(nodeName, daemonName string, healthzPort int, pollInterval, pollTimeout time.Duration) *restartDaemonConfig

NewRestartConfig creates a restartDaemonConfig for the given node and daemon.

func Query added in v1.2.0

func Query(c clientset.Interface, query string) (*influxdb.Response, error)

Query sends a command to the server and returns the Response

func RemoveCleanupAction added in v1.2.0

func RemoveCleanupAction(p CleanupActionHandle)

RemoveCleanupAction removes a function that was installed by AddCleanupAction.

func ReplicaSetServeImageOrFail added in v1.2.0

func ReplicaSetServeImageOrFail(f *framework.Framework, test string, image string)

A basic test to check the deployment of an image using a ReplicaSet. The image serves its hostname which is checked for each replica.

func ReserveCpu added in v1.1.0

func ReserveCpu(f *framework.Framework, id string, replicas, millicores int)

func ReserveMemory added in v1.1.0

func ReserveMemory(f *framework.Framework, id string, replicas, megabytes int, expectRunning bool)

func ResizeGroup added in v1.3.0

func ResizeGroup(group string, size int32) error

func RunCleanupActions added in v1.2.0

func RunCleanupActions()

RunCleanupActions runs all functions installed by AddCleanupAction. It does not remove them (see RemoveCleanupAction) but it does run unlocked, so they may remove themselves.

func RunE2ETests

func RunE2ETests(t *testing.T)

TestE2E checks configuration parameters (specified through flags) and then runs E2E tests using the Ginkgo runner. If a "report directory" is specified, one or more JUnit test reports will be generated in this directory, and cluster logs will also be saved. This function is called on each Ginkgo node in parallel mode.

func RunLogPodsWithSleepOf added in v1.5.0

func RunLogPodsWithSleepOf(f *framework.Framework, sleep time.Duration, podname string, timeout time.Duration)

RunLogPodsWithSleepOf creates a pod on every node, logs continuously (with "sleep" pauses), and verifies that the log string was produced in each and every pod at least once. The final arg is the timeout for the test to verify all the pods got logs.

func ServeImageOrFail added in v0.11.0

func ServeImageOrFail(f *framework.Framework, test string, image string)

A basic test to check the deployment of an image using a replication controller. The image serves its hostname which is checked for each replica.

func SkipIfAppArmorNotSupported

func SkipIfAppArmorNotSupported()

func SpreadRCOrFail added in v1.2.0

func SpreadRCOrFail(f *framework.Framework, replicaCount int32, image string)

Check that the pods comprising a replication controller get spread evenly across available zones

func SpreadServiceOrFail added in v1.2.0

func SpreadServiceOrFail(f *framework.Framework, replicaCount int, image string)

Check that the pods comprising a service get spread evenly across available zones

func WaitForClusterSizeFunc added in v1.3.0

func WaitForClusterSizeFunc(c clientset.Interface, sizeFunc func(int) bool, timeout time.Duration) error

WaitForClusterSize waits until the cluster size matches the given function.

func WaitForGroupSize added in v1.3.0

func WaitForGroupSize(group string, size int32) error

func WaitForTerminatedContainer added in v1.6.0

func WaitForTerminatedContainer(f *framework.Framework, pod *v1.Pod, containerName string) error

Types

type CleanupActionHandle added in v1.2.0

type CleanupActionHandle *int

func AddCleanupAction added in v1.2.0

func AddCleanupAction(fn func()) CleanupActionHandle

AddCleanupAction installs a function that will be called in the event of the whole test being terminated. This allows arbitrary pieces of the overall test to hook into SynchronizedAfterSuite().

type DNSParamsLinear added in v1.5.0

type DNSParamsLinear struct {
	// contains filtered or unexported fields
}

type DensityTestConfig added in v1.4.1

type DensityTestConfig struct {
	Configs           []testutils.RunObjectConfig
	ClientSet         clientset.Interface
	InternalClientset internalclientset.Interface
	PollInterval      time.Duration
	PodCount          int

	SecretConfigs []*testutils.SecretConfig
	DaemonConfigs []*testutils.DaemonConfig
	// contains filtered or unexported fields
}

type Foo added in v1.3.0

type Foo struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty" description:"standard object metadata"`

	SomeField  string `json:"someField"`
	OtherField int    `json:"otherField"`
}

type FooList added in v1.3.0

type FooList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `` /* 134-byte string literal not displayed */

	Items []Foo `json:"items"`
}

type GCEIngressController added in v1.3.0

type GCEIngressController struct {
	UID string
	// contains filtered or unexported fields
}

GCEIngressController manages implementation details of Ingress on GCE/GKE.

func (*GCEIngressController) Cleanup added in v1.3.0

func (cont *GCEIngressController) Cleanup(del bool) error

Cleanup cleans up cloud resources. If del is false, it simply reports existing resources without deleting them. It always deletes resources created through it's methods, like staticIP, even if del is false.

type HPAScaleTest added in v1.2.0

type HPAScaleTest struct {
	// contains filtered or unexported fields
}

HPAScaleTest struct is used by the scale(...) function.

type IPerfResult added in v1.3.0

type IPerfResult struct {
	// contains filtered or unexported fields
}

IPerfResult struct modelling an iperf record.... 20160314154239,172.17.0.3,34152,172.17.0.2,5001,3,0.0-10.0,33843707904,27074774092

func NewIPerf added in v1.3.0

func NewIPerf(csvLine string) *IPerfResult

NewIPerf parses an IPerf CSV output line into an IPerfResult.

type IPerfResults added in v1.3.0

type IPerfResults struct {
	BandwidthMap map[string]int64
}

func (*IPerfResults) Add added in v1.3.0

func (i *IPerfResults) Add(ipr *IPerfResult)

Add adds a new result to the Results struct.

func (*IPerfResults) ToTSV added in v1.3.0

func (i *IPerfResults) ToTSV() string

ToTSV exports an easily readable tab delimited format of all IPerfResults.

type LBCTester added in v1.1.1

type LBCTester interface {
	// contains filtered or unexported methods
}

LBCTester is an interface used to test loadbalancer controllers.

type LogEntry added in v1.5.0

type LogEntry struct {
	TextPayload string
}

type NginxIngressController added in v1.4.1

type NginxIngressController struct {
	// contains filtered or unexported fields
}

NginxIngressController manages implementation details of Ingress on Nginx.

type ResourceConsumer added in v1.1.0

type ResourceConsumer struct {
	// contains filtered or unexported fields
}

ResourceConsumer is a tool for testing. It helps create specified usage of CPU or memory (Warning: memory not supported) typical use case: rc.ConsumeCPU(600) // ... check your assumption here rc.ConsumeCPU(300) // ... check your assumption here

func NewDynamicResourceConsumer added in v1.1.0

func NewDynamicResourceConsumer(name, kind string, replicas, initCPUTotal, initMemoryTotal, initCustomMetric int, cpuLimit, memLimit int64, f *framework.Framework) *ResourceConsumer

func NewStaticResourceConsumer added in v1.1.0

func NewStaticResourceConsumer(name string, replicas, initCPUTotal, initMemoryTotal, initCustomMetric int, cpuLimit, memLimit int64, f *framework.Framework) *ResourceConsumer

TODO this still defaults to replication controller

func (*ResourceConsumer) CleanUp added in v1.1.0

func (rc *ResourceConsumer) CleanUp()

func (*ResourceConsumer) ConsumeCPU added in v1.1.0

func (rc *ResourceConsumer) ConsumeCPU(millicores int)

ConsumeCPU consumes given number of CPU

func (*ResourceConsumer) ConsumeCustomMetric added in v1.2.0

func (rc *ResourceConsumer) ConsumeCustomMetric(amount int)

ConsumeMem consumes given number of custom metric

func (*ResourceConsumer) ConsumeMem added in v1.1.0

func (rc *ResourceConsumer) ConsumeMem(megabytes int)

ConsumeMem consumes given number of Mem

func (*ResourceConsumer) EnsureDesiredReplicas added in v1.2.0

func (rc *ResourceConsumer) EnsureDesiredReplicas(desiredReplicas int, timeout time.Duration)

func (*ResourceConsumer) GetReplicas added in v1.1.0

func (rc *ResourceConsumer) GetReplicas() int

func (*ResourceConsumer) WaitForReplicas added in v1.1.0

func (rc *ResourceConsumer) WaitForReplicas(desiredReplicas int)

type State added in v0.18.0

type State struct {
	Received map[string]int
}

partially cloned from webserver.go

type StrSlice added in v1.3.0

type StrSlice []string

type VolumeTest added in v1.6.0

type VolumeTest struct {
	// contains filtered or unexported fields
}

VolumeTest contains a volumes to mount into a client pod and its expected content.

type VolumeTestConfig added in v0.18.0

type VolumeTestConfig struct {
	// contains filtered or unexported fields
}

Configuration of one tests. The test consist of: - server pod - runs serverImage, exports ports[] - client pod - does not need any special configuration

Directories

Path Synopsis
Package upgrades provides a framework for testing Kubernetes features before, during, and after different types of upgrades.
Package upgrades provides a framework for testing Kubernetes features before, during, and after different types of upgrades.

Jump to

Keyboard shortcuts

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