e2e

package
v1.3.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2016 License: Apache-2.0 Imports: 91 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ADD    = "ADD"
	DEL    = "DEL"
	UPDATE = "UPDATE"
)
View Source
const (
	MinSaturationThreshold     = 2 * time.Minute
	MinPodsPerSecondThroughput = 8
)

Variables

View Source
var MaxContainerFailures = 0

Maximum container failures this test tolerates before failing.

View Source
var ServiceNodePortRange = utilnet.PortRange{Base: 30000, Size: 2768}

This should match whatever the default/configured range is

Functions

func CheckCadvisorHealthOnAllNodes added in v0.11.0

func CheckCadvisorHealthOnAllNodes(c *client.Client, timeout time.Duration)

func ClusterLevelLoggingWithElasticsearch added in v0.14.0

func ClusterLevelLoggingWithElasticsearch(f *framework.Framework)

ClusterLevelLoggingWithElasticsearch is an end to end test for cluster level logging.

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 LaunchNetTestPodPerNode added in v0.15.0

func LaunchNetTestPodPerNode(f *framework.Framework, nodes *api.NodeList, name, version string) []string

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 *client.Client, 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, millicores int)

func ReserveMemory added in v1.1.0

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

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 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 SpreadRCOrFail added in v1.2.0

func SpreadRCOrFail(f *framework.Framework, replicaCount int, 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

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 HPAScaleTest added in v1.2.0

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

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

type IngressController added in v1.2.0

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

func (*IngressController) Cleanup added in v1.2.0

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

type KubeProxyTestConfig added in v1.1.0

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

type KubeletManagedHostConfig added in v1.1.1

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

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 PortsByPodName added in v1.1.0

type PortsByPodName map[string][]int

type PortsByPodUID added in v1.1.0

type PortsByPodUID map[types.UID][]int

type PrivilegedPodTestConfig added in v1.1.0

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

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 ServiceTestFixture added in v1.2.0

type ServiceTestFixture struct {
	ServiceName string
	Namespace   string
	Client      *client.Client

	TestId string
	Labels map[string]string
	// contains filtered or unexported fields
}

Simple helper class to avoid too much boilerplate in tests

func NewServerTest added in v1.2.0

func NewServerTest(client *client.Client, namespace string, serviceName string) *ServiceTestFixture

func (*ServiceTestFixture) BuildServiceSpec added in v1.2.0

func (t *ServiceTestFixture) BuildServiceSpec() *api.Service

Build default config for a service (which can then be changed)

func (*ServiceTestFixture) Cleanup added in v1.2.0

func (t *ServiceTestFixture) Cleanup() []error

func (*ServiceTestFixture) CreateService added in v1.2.0

func (t *ServiceTestFixture) CreateService(service *api.Service) (*api.Service, error)

Create a service, and record it for cleanup

func (*ServiceTestFixture) CreateWebserverRC added in v1.2.0

func (t *ServiceTestFixture) CreateWebserverRC(replicas int) *api.ReplicationController

CreateWebserverRC creates rc-backed pods with the well-known webserver configuration and records it for cleanup.

func (*ServiceTestFixture) DeleteService added in v1.2.0

func (t *ServiceTestFixture) DeleteService(serviceName string) error

Delete a service, and remove it from the cleanup list

type ServiceTestJig added in v1.2.0

type ServiceTestJig struct {
	ID     string
	Name   string
	Client *client.Client
	Labels map[string]string
}

A test jig to help testing.

func NewServiceTestJig added in v1.2.0

func NewServiceTestJig(client *client.Client, name string) *ServiceTestJig

NewServiceTestJig allocates and inits a new ServiceTestJig.

func (*ServiceTestJig) ChangeServiceNodePortOrFail added in v1.2.0

func (j *ServiceTestJig) ChangeServiceNodePortOrFail(namespace, name string, initial int) *api.Service

func (*ServiceTestJig) CreateTCPServiceOrFail added in v1.2.0

func (j *ServiceTestJig) CreateTCPServiceOrFail(namespace string, tweak func(svc *api.Service)) *api.Service

CreateTCPServiceOrFail creates a new TCP Service based on the jig's defaults. Callers can provide a function to tweak the Service object before it is created.

func (*ServiceTestJig) CreateUDPServiceOrFail added in v1.2.0

func (j *ServiceTestJig) CreateUDPServiceOrFail(namespace string, tweak func(svc *api.Service)) *api.Service

CreateUDPServiceOrFail creates a new UDP Service based on the jig's defaults. Callers can provide a function to tweak the Service object before it is created.

func (*ServiceTestJig) RunOrFail added in v1.2.0

func (j *ServiceTestJig) RunOrFail(namespace string, tweak func(rc *api.ReplicationController)) *api.ReplicationController

RunOrFail creates a ReplicationController and Pod(s) and waits for the Pod(s) to be running. Callers can provide a function to tweak the RC object before it is created.

func (*ServiceTestJig) SanityCheckService added in v1.2.0

func (j *ServiceTestJig) SanityCheckService(svc *api.Service, svcType api.ServiceType)

func (*ServiceTestJig) TestNotReachableHTTP added in v1.2.0

func (j *ServiceTestJig) TestNotReachableHTTP(host string, port int, timeout time.Duration)

func (*ServiceTestJig) TestNotReachableUDP added in v1.2.0

func (j *ServiceTestJig) TestNotReachableUDP(host string, port int, timeout time.Duration)

func (*ServiceTestJig) TestReachableHTTP added in v1.2.0

func (j *ServiceTestJig) TestReachableHTTP(host string, port int, timeout time.Duration)

func (*ServiceTestJig) TestReachableUDP added in v1.2.0

func (j *ServiceTestJig) TestReachableUDP(host string, port int, timeout time.Duration)

func (*ServiceTestJig) UpdateService added in v1.2.0

func (j *ServiceTestJig) UpdateService(namespace, name string, update func(*api.Service)) (*api.Service, error)

UpdateService fetches a service, calls the update function on it, and then attempts to send the updated service. It tries up to 3 times in the face of timeouts and conflicts.

func (*ServiceTestJig) UpdateServiceOrFail added in v1.2.0

func (j *ServiceTestJig) UpdateServiceOrFail(namespace, name string, update func(*api.Service)) *api.Service

UpdateServiceOrFail fetches a service, calls the update function on it, and then attempts to send the updated service. It tries up to 3 times in the face of timeouts and conflicts.

func (*ServiceTestJig) WaitForLoadBalancerDestroyOrFail added in v1.2.0

func (j *ServiceTestJig) WaitForLoadBalancerDestroyOrFail(namespace, name string, ip string, port int) *api.Service

func (*ServiceTestJig) WaitForLoadBalancerOrFail added in v1.2.0

func (j *ServiceTestJig) WaitForLoadBalancerOrFail(namespace, name string) *api.Service

type State added in v0.18.0

type State struct {
	Received map[string]int
}

partially cloned from webserver.go

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
This is a utility for prometheus pushing functionality.
This is a utility for prometheus pushing functionality.

Jump to

Keyboard shortcuts

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