Documentation ¶
Index ¶
- Constants
- Variables
- func CheckCadvisorHealthOnAllNodes(c *client.Client, timeout time.Duration)
- func ClusterLevelLoggingWithElasticsearch(f *framework.Framework)
- func ClusterLevelLoggingWithKibana(f *framework.Framework)
- func LaunchNetTestPodPerNode(f *framework.Framework, nodes *api.NodeList, name, version string) []string
- func NewRestartConfig(nodeName, daemonName string, healthzPort int, ...) *restartDaemonConfig
- func Query(c *client.Client, query string) (*influxdb.Response, error)
- func RemoveCleanupAction(p CleanupActionHandle)
- func ReplicaSetServeImageOrFail(f *framework.Framework, test string, image string)
- func ReserveCpu(f *framework.Framework, id string, millicores int)
- func ReserveMemory(f *framework.Framework, id string, megabytes int)
- func RunCleanupActions()
- func RunE2ETests(t *testing.T)
- func ServeImageOrFail(f *framework.Framework, test string, image string)
- func SpreadRCOrFail(f *framework.Framework, replicaCount int32, image string)
- func SpreadServiceOrFail(f *framework.Framework, replicaCount int, image string)
- type CleanupActionHandle
- type HPAScaleTest
- type IPerfResult
- type IPerfResults
- type IngressController
- type KubeProxyTestConfig
- type KubeletManagedHostConfig
- type LBCTester
- type PortsByPodName
- type PortsByPodUID
- type PrivilegedPodTestConfig
- type ResourceConsumer
- func (rc *ResourceConsumer) CleanUp()
- func (rc *ResourceConsumer) ConsumeCPU(millicores int)
- func (rc *ResourceConsumer) ConsumeCustomMetric(amount int)
- func (rc *ResourceConsumer) ConsumeMem(megabytes int)
- func (rc *ResourceConsumer) EnsureDesiredReplicas(desiredReplicas int, timeout time.Duration)
- func (rc *ResourceConsumer) GetReplicas() int
- func (rc *ResourceConsumer) WaitForReplicas(desiredReplicas int)
- type ServiceTestFixture
- func (t *ServiceTestFixture) BuildServiceSpec() *api.Service
- func (t *ServiceTestFixture) Cleanup() []error
- func (t *ServiceTestFixture) CreateService(service *api.Service) (*api.Service, error)
- func (t *ServiceTestFixture) CreateWebserverRC(replicas int32) *api.ReplicationController
- func (t *ServiceTestFixture) DeleteService(serviceName string) error
- type ServiceTestJig
- func (j *ServiceTestJig) ChangeServiceNodePortOrFail(namespace, name string, initial int) *api.Service
- func (j *ServiceTestJig) CreateTCPServiceOrFail(namespace string, tweak func(svc *api.Service)) *api.Service
- func (j *ServiceTestJig) CreateUDPServiceOrFail(namespace string, tweak func(svc *api.Service)) *api.Service
- func (j *ServiceTestJig) RunOrFail(namespace string, tweak func(rc *api.ReplicationController)) *api.ReplicationController
- func (j *ServiceTestJig) SanityCheckService(svc *api.Service, svcType api.ServiceType)
- func (j *ServiceTestJig) TestNotReachableHTTP(host string, port int, timeout time.Duration)
- func (j *ServiceTestJig) TestNotReachableUDP(host string, port int, timeout time.Duration)
- func (j *ServiceTestJig) TestReachableHTTP(host string, port int, timeout time.Duration)
- func (j *ServiceTestJig) TestReachableUDP(host string, port int, timeout time.Duration)
- func (j *ServiceTestJig) UpdateService(namespace, name string, update func(*api.Service)) (*api.Service, error)
- func (j *ServiceTestJig) UpdateServiceOrFail(namespace, name string, update func(*api.Service)) *api.Service
- func (j *ServiceTestJig) WaitForLoadBalancerDestroyOrFail(namespace, name string, ip string, port int) *api.Service
- func (j *ServiceTestJig) WaitForLoadBalancerOrFail(namespace, name string) *api.Service
- type State
- type StrSlice
- type VolumeTestConfig
Constants ¶
const ( ADD = "ADD" DEL = "DEL" UPDATE = "UPDATE" )
const ( MinSaturationThreshold = 2 * time.Minute MinPodsPerSecondThroughput = 8 )
Variables ¶
var MaxContainerFailures = 0
Maximum container failures this test tolerates before failing.
var ServiceNodePortRange = utilnet.PortRange{Base: 30000, Size: 2768}
This should match whatever the default/configured range is
Functions ¶
func ClusterLevelLoggingWithElasticsearch ¶
ClusterLevelLoggingWithElasticsearch is an end to end test for cluster level logging.
func ClusterLevelLoggingWithKibana ¶
ClusterLevelLoggingWithKibana is an end to end test that checks to see if Kibana is alive.
func LaunchNetTestPodPerNode ¶
func NewRestartConfig ¶
func NewRestartConfig(nodeName, daemonName string, healthzPort int, pollInterval, pollTimeout time.Duration) *restartDaemonConfig
NewRestartConfig creates a restartDaemonConfig for the given node and daemon.
func RemoveCleanupAction ¶
func RemoveCleanupAction(p CleanupActionHandle)
RemoveCleanupAction removes a function that was installed by AddCleanupAction.
func ReplicaSetServeImageOrFail ¶
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 RunCleanupActions ¶
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 ¶
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 ¶
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 ¶
Check that the pods comprising a replication controller get spread evenly across available zones
Types ¶
type CleanupActionHandle ¶
type CleanupActionHandle *int
func AddCleanupAction ¶
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 ¶
type HPAScaleTest struct {
// contains filtered or unexported fields
}
HPAScaleTest struct is used by the scale(...) function.
type IPerfResult ¶
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 ¶
func NewIPerf(csvLine string) *IPerfResult
NewIPerf parses an IPerf CSV output line into an IPerfResult.
type IPerfResults ¶
func (*IPerfResults) Add ¶
func (i *IPerfResults) Add(ipr *IPerfResult)
Add adds a new result to the Results struct.
func (*IPerfResults) ToTSV ¶
func (i *IPerfResults) ToTSV() string
ToTSV exports an easily readable tab delimited format of all IPerfResults.
type IngressController ¶
type IngressController struct { UID string Project string // contains filtered or unexported fields }
func (*IngressController) Cleanup ¶
func (cont *IngressController) Cleanup(del bool) error
type KubeProxyTestConfig ¶
type KubeProxyTestConfig struct {
// contains filtered or unexported fields
}
type KubeletManagedHostConfig ¶
type KubeletManagedHostConfig struct {
// contains filtered or unexported fields
}
type LBCTester ¶
type LBCTester interface {
// contains filtered or unexported methods
}
LBCTester is an interface used to test loadbalancer controllers.
type PortsByPodName ¶
type PortsByPodUID ¶
type PrivilegedPodTestConfig ¶
type PrivilegedPodTestConfig struct {
// contains filtered or unexported fields
}
type ResourceConsumer ¶
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 NewStaticResourceConsumer ¶
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 ¶
func (rc *ResourceConsumer) CleanUp()
func (*ResourceConsumer) ConsumeCPU ¶
func (rc *ResourceConsumer) ConsumeCPU(millicores int)
ConsumeCPU consumes given number of CPU
func (*ResourceConsumer) ConsumeCustomMetric ¶
func (rc *ResourceConsumer) ConsumeCustomMetric(amount int)
ConsumeMem consumes given number of custom metric
func (*ResourceConsumer) ConsumeMem ¶
func (rc *ResourceConsumer) ConsumeMem(megabytes int)
ConsumeMem consumes given number of Mem
func (*ResourceConsumer) EnsureDesiredReplicas ¶
func (rc *ResourceConsumer) EnsureDesiredReplicas(desiredReplicas int, timeout time.Duration)
func (*ResourceConsumer) GetReplicas ¶
func (rc *ResourceConsumer) GetReplicas() int
func (*ResourceConsumer) WaitForReplicas ¶
func (rc *ResourceConsumer) WaitForReplicas(desiredReplicas int)
type ServiceTestFixture ¶
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 ¶
func NewServerTest(client *client.Client, namespace string, serviceName string) *ServiceTestFixture
func (*ServiceTestFixture) BuildServiceSpec ¶
func (t *ServiceTestFixture) BuildServiceSpec() *api.Service
Build default config for a service (which can then be changed)
func (*ServiceTestFixture) Cleanup ¶
func (t *ServiceTestFixture) Cleanup() []error
func (*ServiceTestFixture) CreateService ¶
Create a service, and record it for cleanup
func (*ServiceTestFixture) CreateWebserverRC ¶
func (t *ServiceTestFixture) CreateWebserverRC(replicas int32) *api.ReplicationController
CreateWebserverRC creates rc-backed pods with the well-known webserver configuration and records it for cleanup.
func (*ServiceTestFixture) DeleteService ¶
func (t *ServiceTestFixture) DeleteService(serviceName string) error
Delete a service, and remove it from the cleanup list
type ServiceTestJig ¶
A test jig to help testing.
func NewServiceTestJig ¶
func NewServiceTestJig(client *client.Client, name string) *ServiceTestJig
NewServiceTestJig allocates and inits a new ServiceTestJig.
func (*ServiceTestJig) ChangeServiceNodePortOrFail ¶
func (j *ServiceTestJig) ChangeServiceNodePortOrFail(namespace, name string, initial int) *api.Service
func (*ServiceTestJig) CreateTCPServiceOrFail ¶
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 ¶
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 ¶
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 ¶
func (j *ServiceTestJig) SanityCheckService(svc *api.Service, svcType api.ServiceType)
func (*ServiceTestJig) TestNotReachableHTTP ¶
func (j *ServiceTestJig) TestNotReachableHTTP(host string, port int, timeout time.Duration)
func (*ServiceTestJig) TestNotReachableUDP ¶
func (j *ServiceTestJig) TestNotReachableUDP(host string, port int, timeout time.Duration)
func (*ServiceTestJig) TestReachableHTTP ¶
func (j *ServiceTestJig) TestReachableHTTP(host string, port int, timeout time.Duration)
func (*ServiceTestJig) TestReachableUDP ¶
func (j *ServiceTestJig) TestReachableUDP(host string, port int, timeout time.Duration)
func (*ServiceTestJig) UpdateService ¶
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 ¶
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 ¶
func (*ServiceTestJig) WaitForLoadBalancerOrFail ¶
func (j *ServiceTestJig) WaitForLoadBalancerOrFail(namespace, name string) *api.Service
type VolumeTestConfig ¶
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
Source Files ¶
- addon_update.go
- autoscaling_utils.go
- batch_v1_jobs.go
- cadvisor.go
- cluster_size_autoscaling.go
- cluster_upgrade.go
- configmap.go
- container_probe.go
- daemon_restart.go
- daemon_set.go
- dashboard.go
- density.go
- deployment.go
- dns.go
- docker_containers.go
- downward_api.go
- downwardapi_volume.go
- e2e.go
- empty_dir.go
- empty_dir_wrapper.go
- es_cluster_logging.go
- etcd_failure.go
- events.go
- example_cluster_dns.go
- example_k8petstore.go
- examples.go
- expansion.go
- garbage_collector.go
- generated_clientset.go
- google_compute.go
- horizontal_pod_autoscaling.go
- host_path.go
- ingress.go
- ingress_utils.go
- initial_resources.go
- job.go
- kibana_logging.go
- kubectl.go
- kubelet.go
- kubelet_etc_hosts.go
- kubelet_perf.go
- kubeproxy.go
- limit_range.go
- load.go
- mesos.go
- monitoring.go
- namespace.go
- networking.go
- networking_perf.go
- nodeoutofdisk.go
- pd.go
- persistent_volumes.go
- pods.go
- portforward.go
- pre_stop.go
- privileged.go
- proxy.go
- rc.go
- reboot.go
- replica_set.go
- resize_nodes.go
- resource_quota.go
- restart.go
- scheduler_predicates.go
- secrets.go
- security_context.go
- service.go
- service_accounts.go
- service_latency.go
- serviceloadbalancers.go
- ssh.go
- ubernetes_lite.go
- util_iperf.go
- volume_provisioning.go
- volumes.go