package e2e
import "k8s.io/kubernetes/test/e2e"
Index ¶
- Variables
- func BadEvents(events []*api.Event) int
- func CheckCadvisorHealthOnAllNodes(c *client.Client, timeout time.Duration)
- func ClusterLevelLoggingWithElasticsearch(c *client.Client)
- func DeleteRC(c *client.Client, ns, name string) error
- func FailedContainers(pod api.Pod) map[string]ContainerFailures
- func Failf(format string, a ...interface{})
- func HighLatencyRequests(c *client.Client, threshold time.Duration, ignoredResources util.StringSet) (int, error)
- func LaunchNetTestPodPerNode(f *Framework, nodes *api.NodeList, name, version string) []string
- func Logf(format string, a ...interface{})
- func NodeSSHHosts(c *client.Client) ([]string, error)
- func RunRC(c *client.Client, name string, ns, image string, replicas int) error
- func SSH(cmd, host, provider string) (string, string, int, error)
- func ScaleRC(c *client.Client, ns, name string, size uint) error
- func ServeImageOrFail(c *client.Client, test string, image string)
- type CloudConfig
- type ContainerFailures
- type Framework
- func NewFramework(baseName string) *Framework
- func (f *Framework) TestContainerOutput(scenarioName string, pod *api.Pod, expectedOutput []string)
- func (f *Framework) WaitForPodRunning(podName string) error
- type LatencyMetric
- type LatencyMetricByLatency
- func (a LatencyMetricByLatency) Len() int
- func (a LatencyMetricByLatency) Less(i, j int) bool
- func (a LatencyMetricByLatency) Swap(i, j int)
- type PodDiff
- func Diff(oldPods *api.PodList, curPods *api.PodList) PodDiff
- func (p PodDiff) Print(ignorePhases util.StringSet)
- type State
- type TestContextType
- type VolumeTestConfig
- type WebserverTest
- func NewWebserverTest(client *client.Client, namespace string, serviceName string) *WebserverTest
- func (t *WebserverTest) BuildServiceSpec() *api.Service
- func (t *WebserverTest) Cleanup() []error
- func (t *WebserverTest) CreatePod(pod *api.Pod) (*api.Pod, error)
- func (t *WebserverTest) CreateService(service *api.Service) (*api.Service, error)
- func (t *WebserverTest) CreateWebserverPod()
- func (t *WebserverTest) DeleteService(serviceName string) error
- func (t *WebserverTest) SequenceNext() int
Variables ¶
This should match whatever the default/configured range is
Functions ¶
func BadEvents ¶
Prints the histogram of the events and returns the number of bad events.
func CheckCadvisorHealthOnAllNodes ¶
func ClusterLevelLoggingWithElasticsearch ¶
ClusterLevelLoggingWithElasticsearch is an end to end test for cluster level logging.
func DeleteRC ¶
Delete a Replication Controller and all pods it spawned
func FailedContainers ¶
func FailedContainers(pod api.Pod) map[string]ContainerFailures
FailedContainers inspects all containers in a pod and returns failure information for containers that have failed or been restarted. A map is returned where the key is the containerID and the value is a struct containing the restart and failure information
func Failf ¶
func Failf(format string, a ...interface{})
func HighLatencyRequests ¶
func HighLatencyRequests(c *client.Client, threshold time.Duration, ignoredResources util.StringSet) (int, error)
Prints summary metrics for request types with latency above threshold and returns number of such request types.
func LaunchNetTestPodPerNode ¶
func Logf ¶
func Logf(format string, a ...interface{})
func NodeSSHHosts ¶
NodeSSHHosts returns SSH-able host names for all nodes. It returns an error if it can't find an external IP for every node, though it still returns all hosts that it found in that case.
func RunRC ¶
RunRC Launches (and verifies correctness) of a Replication Controller It will waits for all pods it spawns to become "Running". It's the caller's responsibility to clean up externally (i.e. use the namespace lifecycle for handling cleanup).
func SSH ¶
SSH synchronously SSHs to a node running on provider and runs cmd. If there is no error performing the SSH, the stdout, stderr, and exit code are returned.
func ScaleRC ¶
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.
Types ¶
type CloudConfig ¶
type CloudConfig struct { ProjectID string Zone string MasterName string NodeInstanceGroup string NumNodes int Provider cloudprovider.Interface }
type ContainerFailures ¶
type ContainerFailures struct {
// contains filtered or unexported fields
}
type Framework ¶
Framework supports common operations used by e2e tests; it will keep a client & a namespace for you. Eventual goal is to merge this with integration test framework.
func NewFramework ¶
NewFramework makes a new framework and sets up a BeforeEach/AfterEach for you (you can write additional before/after each functions).
func (*Framework) TestContainerOutput ¶
Runs the given pod and verifies that its output matches the desired output.
func (*Framework) WaitForPodRunning ¶
WaitForPodRunning waits for the pod to run in the namespace.
type LatencyMetric ¶
type LatencyMetric struct { Verb string Resource string // 0 <= quantile <=1, e.g. 0.95 is 95%tile, 0.5 is median. Quantile float64 Latency time.Duration }
LatencyMetrics stores data about request latency at a given quantile broken down by verb (e.g. GET, PUT, LIST) and resource (e.g. pods, services).
func ReadLatencyMetrics ¶
func ReadLatencyMetrics(c *client.Client) ([]LatencyMetric, error)
type LatencyMetricByLatency ¶
type LatencyMetricByLatency []LatencyMetric
LatencyMetricByLatency implements sort.Interface for []LatencyMetric based on the latency field.
func (LatencyMetricByLatency) Len ¶
func (a LatencyMetricByLatency) Len() int
func (LatencyMetricByLatency) Less ¶
func (a LatencyMetricByLatency) Less(i, j int) bool
func (LatencyMetricByLatency) Swap ¶
func (a LatencyMetricByLatency) Swap(i, j int)
type PodDiff ¶
type PodDiff map[string]*podInfo
PodDiff is a map of pod name to podInfos
func Diff ¶
Diff computes a PodDiff given 2 lists of pods.
func (PodDiff) Print ¶
Print formats and prints the give PodDiff.
type State ¶
partially cloned from webserver.go
type TestContextType ¶
type TestContextType struct { KubeConfig string KubeContext string CertDir string Host string RepoRoot string Provider string CloudConfig CloudConfig KubectlPath string }
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
type WebserverTest ¶
type WebserverTest 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 NewWebserverTest ¶
func NewWebserverTest(client *client.Client, namespace string, serviceName string) *WebserverTest
func (*WebserverTest) BuildServiceSpec ¶
func (t *WebserverTest) BuildServiceSpec() *api.Service
Build default config for a service (which can then be changed)
func (*WebserverTest) Cleanup ¶
func (t *WebserverTest) Cleanup() []error
func (*WebserverTest) CreatePod ¶
Create a pod, and record it for cleanup
func (*WebserverTest) CreateService ¶
Create a service, and record it for cleanup
func (*WebserverTest) CreateWebserverPod ¶
func (t *WebserverTest) CreateWebserverPod()
Create a pod with the well-known webserver configuration, and record it for cleanup
func (*WebserverTest) DeleteService ¶
func (t *WebserverTest) DeleteService(serviceName string) error
Delete a service, and remove it from the cleanup list
func (*WebserverTest) SequenceNext ¶
func (t *WebserverTest) SequenceNext() int
Source Files ¶
cadvisor.go certs.go core.go density.go dns.go docker_containers.go downward_api.go empty_dir.go es_cluster_logging.go events.go framework.go host_path.go kubectl.go load.go monitoring.go networking.go pd.go pods.go pre_stop.go rc.go reboot.go resize_nodes.go scale.go secrets.go service.go service_accounts.go shell.go ssh.go util.go volumes.go
- Version
- v0.18.0
- Published
- May 29, 2015
- Platform
- js/wasm
- Imports
- 44 packages
- Last checked
- 11 seconds ago –
Tools for package owners.