{"modulePath":"github.com/stackpointcloud/kubernetes","version":"v1.3.4","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package e2e\n\n## Constants\n\n```go\nconst (\n\tADD    = \"ADD\"\n\tDEL    = \"DEL\"\n\tUPDATE = \"UPDATE\"\n)\n```\n\n```go\nconst (\n\tMinSaturationThreshold     = 2 * time.Minute\n\tMinPodsPerSecondThroughput = 8\n)\n```\n\n```go\nconst (\n\tUserAgentName = \"federation-e2e-service-controller\"\n\t// TODO(madhusudancs): Using the same values as defined in the federated\n\t// service controller. Replace it with the values from the e2e framework.\n\tKubeAPIQPS   = 20.0\n\tKubeAPIBurst = 30\n\n\tFederatedServiceTimeout = 60 * time.Second\n\n\tFederatedServiceName    = \"federated-service\"\n\tFederatedServicePodName = \"federated-service-test-pod\"\n\n\tDefaultFederationName = \"federation\"\n\n\t// We use this to decide how long to wait for our DNS probes to succeed.\n\tDNSTTL = 180 * time.Second // TODO: make k8s.io/kubernetes/federation/pkg/federation-controller/service.minDnsTtl exported, and import it here.\n)\n```\n\n## Variables\n\n```go\nvar FederatedServiceLabels = map[string]string{\n\t\"foo\": \"bar\",\n}\n```\n\n```go\nvar MaxContainerFailures = 0\n```\nMaximum container failures this test tolerates before failing.\n\n```go\nvar ServiceNodePortRange = utilnet.PortRange{Base: 30000, Size: 2768}\n```\nThis should match whatever the default/configured range is\n\n## Functions\n\n```go\nfunc CheckCadvisorHealthOnAllNodes(c *client.Client, timeout time.Duration)\n```\n\n```go\nfunc ClusterLevelLoggingWithElasticsearch(f *framework.Framework)\n```\nClusterLevelLoggingWithElasticsearch is an end to end test for cluster level logging.\n\n```go\nfunc ClusterLevelLoggingWithKibana(f *framework.Framework)\n```\nClusterLevelLoggingWithKibana is an end to end test that checks to see if Kibana is alive.\n\n```go\nfunc CreateHostPortPods(f *framework.Framework, id string, replicas int, expectRunning bool)\n```\n\n```go\nfunc CreateNodeSelectorPods(f *framework.Framework, id string, replicas int, nodeSelector map[string]string, expectRunning bool)\n```\n\n```go\nfunc ExpectNoError(err error)\n```\n\n```go\nfunc GetGroupNodes(group string) ([]string, error)\n```\n\n```go\nfunc GroupSize(group string) (int, error)\n```\n\n```go\nfunc LaunchNetTestPodPerNode(f *framework.Framework, nodes *api.NodeList, name string) []string\n```\n\n```go\nfunc NewRestartConfig(nodeName, daemonName string, healthzPort int, pollInterval, pollTimeout time.Duration) *restartDaemonConfig\n```\nNewRestartConfig creates a restartDaemonConfig for the given node and daemon.\n\n```go\nfunc Query(c *client.Client, query string) (*influxdb.Response, error)\n```\nQuery sends a command to the server and returns the Response\n\n```go\nfunc RemoveCleanupAction(p CleanupActionHandle)\n```\nRemoveCleanupAction removes a function that was installed by AddCleanupAction.\n\n```go\nfunc ReplicaSetServeImageOrFail(f *framework.Framework, test string, image string)\n```\nA basic test to check the deployment of an image using a ReplicaSet. The image serves its hostname which is checked for each replica.\n\n```go\nfunc ReserveCpu(f *framework.Framework, id string, replicas, millicores int)\n```\n\n```go\nfunc ReserveMemory(f *framework.Framework, id string, replicas, megabytes int, expectRunning bool)\n```\n\n```go\nfunc ResizeGroup(group string, size int32) error\n```\n\n```go\nfunc RunCleanupActions()\n```\nRunCleanupActions runs all functions installed by AddCleanupAction.  It does not remove them (see RemoveCleanupAction) but it does run unlocked, so they may remove themselves.\n\n```go\nfunc RunE2ETests(t *testing.T)\n```\nTestE2E 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.\n\n```go\nfunc ServeImageOrFail(f *framework.Framework, test string, image string)\n```\nA basic test to check the deployment of an image using a replication controller. The image serves its hostname which is checked for each replica.\n\n```go\nfunc SpreadRCOrFail(f *framework.Framework, replicaCount int32, image string)\n```\nCheck that the pods comprising a replication controller get spread evenly across available zones\n\n```go\nfunc SpreadServiceOrFail(f *framework.Framework, replicaCount int, image string)\n```\nCheck that the pods comprising a service get spread evenly across available zones\n\n```go\nfunc WaitForClusterSizeFunc(c *client.Client, sizeFunc func(int) bool, timeout time.Duration) error\n```\nWaitForClusterSize waits until the cluster size matches the given function.\n\n```go\nfunc WaitForGroupSize(group string, size int32) error\n```\n\n## Types\n\n```go\ntype CleanupActionHandle *int\n```\n\n```go\nfunc AddCleanupAction(fn func()) CleanupActionHandle\n```\nAddCleanupAction 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().\n\n```go\ntype Foo struct {\n\tunversioned.TypeMeta `json:\",inline\"`\n\tapi.ObjectMeta       `json:\"metadata,omitempty\" description:\"standard object metadata\"`\n\n\tSomeField  string `json:\"someField\"`\n\tOtherField int    `json:\"otherField\"`\n}\n```\n\n```go\ntype FooList struct {\n\tunversioned.TypeMeta `json:\",inline\"`\n\tunversioned.ListMeta `json:\"metadata,omitempty\" description:\"standard list metadata; see http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata\"`\n\n\tItems []Foo `json:\"items\"`\n}\n```\n\n```go\ntype GCEIngressController struct {\n\tUID     string\n\tProject string\n\t// contains filtered or unexported fields\n}\n```\nGCEIngressController manages implementation details of Ingress on GCE/GKE.\n\n```go\nfunc (cont *GCEIngressController) Cleanup(del bool) error\n```\nCleanup 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.\n\n```go\ntype HPAScaleTest struct {\n\t// contains filtered or unexported fields\n}\n```\nHPAScaleTest struct is used by the scale(...) function.\n\n```go\ntype IPerfResult struct {\n\t// contains filtered or unexported fields\n}\n```\nIPerfResult struct modelling an iperf record.... 20160314154239,172.17.0.3,34152,172.17.0.2,5001,3,0.0-10.0,33843707904,27074774092\n\n```go\nfunc NewIPerf(csvLine string) *IPerfResult\n```\nNewIPerf parses an IPerf CSV output line into an IPerfResult.\n\n```go\ntype IPerfResults struct {\n\tBandwidthMap map[string]int64\n}\n```\n\n```go\nfunc (i *IPerfResults) Add(ipr *IPerfResult)\n```\nAdd adds a new result to the Results struct.\n\n```go\nfunc (i *IPerfResults) ToTSV() string\n```\nToTSV exports an easily readable tab delimited format of all IPerfResults.\n\n```go\ntype KubeProxyTestConfig struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype KubeletManagedHostConfig struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype LBCTester interface {\n\t// contains filtered or unexported methods\n}\n```\nLBCTester is an interface used to test loadbalancer controllers.\n\n```go\ntype PortsByPodName map[string][]int\n```\n\n```go\ntype PortsByPodUID map[types.UID][]int\n```\n\n```go\ntype PrivilegedPodTestConfig struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype ResourceConsumer struct {\n\t// contains filtered or unexported fields\n}\n```\nResourceConsumer 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\n\n```go\nfunc NewDynamicResourceConsumer(name, kind string, replicas, initCPUTotal, initMemoryTotal, initCustomMetric int, cpuLimit, memLimit int64, f *framework.Framework) *ResourceConsumer\n```\n\n```go\nfunc NewStaticResourceConsumer(name string, replicas, initCPUTotal, initMemoryTotal, initCustomMetric int, cpuLimit, memLimit int64, f *framework.Framework) *ResourceConsumer\n```\nTODO this still defaults to replication controller\n\n```go\nfunc (rc *ResourceConsumer) CleanUp()\n```\n\n```go\nfunc (rc *ResourceConsumer) ConsumeCPU(millicores int)\n```\nConsumeCPU consumes given number of CPU\n\n```go\nfunc (rc *ResourceConsumer) ConsumeCustomMetric(amount int)\n```\nConsumeMem consumes given number of custom metric\n\n```go\nfunc (rc *ResourceConsumer) ConsumeMem(megabytes int)\n```\nConsumeMem consumes given number of Mem\n\n```go\nfunc (rc *ResourceConsumer) EnsureDesiredReplicas(desiredReplicas int, timeout time.Duration)\n```\n\n```go\nfunc (rc *ResourceConsumer) GetReplicas() int\n```\n\n```go\nfunc (rc *ResourceConsumer) WaitForReplicas(desiredReplicas int)\n```\n\n```go\ntype ServiceTestFixture struct {\n\tServiceName string\n\tNamespace   string\n\tClient      *client.Client\n\n\tTestId string\n\tLabels map[string]string\n\t// contains filtered or unexported fields\n}\n```\nSimple helper class to avoid too much boilerplate in tests\n\n```go\nfunc NewServerTest(client *client.Client, namespace string, serviceName string) *ServiceTestFixture\n```\n\n```go\nfunc (t *ServiceTestFixture) BuildServiceSpec() *api.Service\n```\nBuild default config for a service (which can then be changed)\n\n```go\nfunc (t *ServiceTestFixture) Cleanup() []error\n```\n\n```go\nfunc (t *ServiceTestFixture) CreateService(service *api.Service) (*api.Service, error)\n```\nCreate a service, and record it for cleanup\n\n```go\nfunc (t *ServiceTestFixture) CreateWebserverRC(replicas int32) *api.ReplicationController\n```\nCreateWebserverRC creates rc-backed pods with the well-known webserver configuration and records it for cleanup.\n\n```go\nfunc (t *ServiceTestFixture) DeleteService(serviceName string) error\n```\nDelete a service, and remove it from the cleanup list\n\n```go\ntype ServiceTestJig struct {\n\tID     string\n\tName   string\n\tClient *client.Client\n\tLabels map[string]string\n}\n```\nA test jig to help testing.\n\n```go\nfunc NewServiceTestJig(client *client.Client, name string) *ServiceTestJig\n```\nNewServiceTestJig allocates and inits a new ServiceTestJig.\n\n```go\nfunc (j *ServiceTestJig) ChangeServiceNodePortOrFail(namespace, name string, initial int) *api.Service\n```\n\n```go\nfunc (j *ServiceTestJig) CreateTCPServiceOrFail(namespace string, tweak func(svc *api.Service)) *api.Service\n```\nCreateTCPServiceOrFail 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.\n\n```go\nfunc (j *ServiceTestJig) CreateUDPServiceOrFail(namespace string, tweak func(svc *api.Service)) *api.Service\n```\nCreateUDPServiceOrFail 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.\n\n```go\nfunc (j *ServiceTestJig) RunOrFail(namespace string, tweak func(rc *api.ReplicationController)) *api.ReplicationController\n```\nRunOrFail 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.\n\n```go\nfunc (j *ServiceTestJig) SanityCheckService(svc *api.Service, svcType api.ServiceType)\n```\n\n```go\nfunc (j *ServiceTestJig) TestNotReachableHTTP(host string, port int, timeout time.Duration)\n```\n\n```go\nfunc (j *ServiceTestJig) TestNotReachableUDP(host string, port int, timeout time.Duration)\n```\n\n```go\nfunc (j *ServiceTestJig) TestReachableHTTP(host string, port int, timeout time.Duration)\n```\n\n```go\nfunc (j *ServiceTestJig) TestReachableUDP(host string, port int, timeout time.Duration)\n```\n\n```go\nfunc (j *ServiceTestJig) UpdateService(namespace, name string, update func(*api.Service)) (*api.Service, error)\n```\nUpdateService 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.\n\n```go\nfunc (j *ServiceTestJig) UpdateServiceOrFail(namespace, name string, update func(*api.Service)) *api.Service\n```\nUpdateServiceOrFail 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.\n\n```go\nfunc (j *ServiceTestJig) WaitForLoadBalancerDestroyOrFail(namespace, name string, ip string, port int) *api.Service\n```\n\n```go\nfunc (j *ServiceTestJig) WaitForLoadBalancerOrFail(namespace, name string) *api.Service\n```\n\n```go\ntype State struct {\n\tReceived map[string]int\n}\n```\npartially cloned from webserver.go\n\n```go\ntype StrSlice []string\n```\n\n```go\ntype VolumeTestConfig struct {\n\t// contains filtered or unexported fields\n}\n```\nConfiguration of one tests. The test consist of: - server pod - runs serverImage, exports ports\\[] - client pod - does not need any special configuration\n\n","path":"github.com/stackpointcloud/kubernetes/test/e2e","name":"e2e","synopsis":"","isRedistributable":true}
