# Packages
No description provided by the author
Package config simplifies the declaration of configuration options.
No description provided by the author
Package ginkgowrapper wraps Ginkgo Fail and Skip functions to panic with structured data instead of a constant string.
No description provided by the author
No description provided by the author
Package log will be removed after switching to use core framework log.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Package testfiles provides a wrapper around various optional ways of retrieving additional files needed during a test run: - builtin bindata - filesystem access
Because it is a is self-contained package, it can be used by test/e2e/framework and test/e2e/manifest without creating a circular dependency.
# Functions
AddCleanupAction installs a function that will be called in the event of the whole test being terminated.
AddOrUpdateLabelOnNode adds the given label key and value to the given node or updates value.
AfterReadingAllFlags makes changes to the context after all flags have been read.
AllNodesReady checks whether all registered nodes are ready.
APIAddress returns a address of an instance.
AppendContainerCommandGroupIfNeeded returns container command group parameter if necessary.
CheckTestingNSDeletedExcept checks whether all e2e based existing namespaces are in the Terminating state and waits until they are finally deleted.
ConformanceIt is wrapper function for ginkgo It.
CoreDump SSHs to the master and all nodes and dumps their logs into dir.
CreateEmptyFileOnPod creates empty file at given path on the pod.
CreatePrivilegedPSPBinding creates the privileged PSP & role.
CreateTestingNS should be used by every test, note that we append a common prefix to the provided test name.
DeleteNamespaces deletes all namespaces that match the given delete and skip filters.
DumpAllNamespaceInfo dumps events, pods and nodes information in the given namespace.
DumpDebugInfo dumps debug info of tests.
DumpNodeDebugInfo dumps debug information of the given nodes.
EnsureLoadBalancerResourcesDeleted ensures that cloud load balancer resources that were created are actually cleaned up.
EtcdUpgrade upgrades etcd on GCE.
ExpectConsistOf expects actual contains precisely the extra elements.
ExpectEmpty expects actual is empty.
ExpectEqual expects the specified two are the same, otherwise an exception raises.
ExpectError expects an error happens, otherwise an exception raises.
ExpectHaveKey expects the actual map has the key in the keyset.
ExpectNodeHasLabel expects that the given node has the given label pair.
ExpectNodeHasTaint expects that the node has the given taint.
ExpectNoError checks if "err" is set, and if so, fails assertion while logging the error.
ExpectNoErrorWithOffset checks if "err" is set, and if so, fails assertion while logging the error at "offset" levels above its caller (for example, for call chain f -> g -> ExpectNoErrorWithOffset(1, ...) error would be logged for "f").
ExpectNotEqual expects the specified two are not the same, otherwise an exception raises.
Fail is a replacement for ginkgo.Fail which logs the problem as it occurs together with a stack trace and then calls ginkgowrapper.Fail.
Failf logs the fail info, including a stack trace starts at 2 levels above its caller (for example, for call chain f -> g -> Failf("foo", ...) error would be logged for "f").
GCEUpgradeScript returns path of script for upgrading on GCE.
GenerateSecureToken returns a string of length tokenLen, consisting of random bytes encoded as base64 for use as a Bearer Token during communication with an APIServer.
GetControlPlaneAddresses returns all IP addresses on which the kubelet can reach the control plane.
GetGroupNodes returns a node name for the specified node group.
GetProviders returns the names of all currently registered providers.
GroupSize returns the size of an instance group.
IsPodSecurityPolicyEnabled returns true if PodSecurityPolicy is enabled.
KoordinatorDescribe is a wrapper function for ginkgo describe.
LoadClientset returns clientset for connecting to kubernetes clusters.
LoadConfig returns a config for a rest client with the UserAgent set to include the current test name.
LocationParamGKE returns parameter related to location for gcloud command.
Logf logs the info.
LookForStringInLog looks for the given string in the log of a specific pod container.
LookForStringInPodExec looks for the given string in the output of a command executed in the first container of specified pod.
LookForStringInPodExecToContainer looks for the given string in the output of a command executed in specified pod container, or first container if not specified.
MasterOSDistroIs returns true if the master OS distro is included in the supportedMasterOsDistros.
MasterUpgradeGKE upgrades master node to the specified version on GKE.
NewDefaultFramework makes a new framework and sets up a BeforeEach/AfterEach for you (you can write additional before/after each functions).
NewFlakeReport returns a new flake report.
NewFramework creates a test framework.
NewFrameworkWithCustomTimeouts makes a framework with with custom timeouts.
NewKubectlCommand returns a KubectlBuilder for running kubectl.
NewLogsVerifier creates a new LogsSizeVerifier which will stop when stopChannel is closed.
NewNodeKiller creates new NodeKiller.
NewResourceUsageGatherer returns a new ContainerResourceGatherer.
NewTimeoutContextWithDefaults returns a TimeoutContext with default values.
NodeHasTaint returns true if the node has the given taint, else returns false.
NodeOSArchIs returns true if the node OS arch is included in the supportedNodeOsArchs.
NodeOSDistroIs returns true if the node OS distro is included in the supportedNodeOsDistros.
PrettyPrintJSON converts metrics to JSON format.
ProviderIs returns true if the provider is included is the providers.
PrunedStack is a wrapper around debug.Stack() that removes information about the current goroutine and optionally skips some of the initial stack entries.
RandomSuffix provides a random sequence to append to pods,services,rcs.
RegisterClusterFlags registers flags specific to the cluster e2e test suite.
RegisterCommonFlags registers flags common to all e2e test suites.
RegisterProvider is expected to be called during application init, typically by an init function in a provider package.
RemoveCleanupAction removes a function that was installed by AddCleanupAction.
RemoveLabelOffNode is for cleaning up labels temporarily added to node, won't fail if target label doesn't exist or has been removed.
ResizeGroup resizes an instance group.
RunCleanupActions runs all functions installed by AddCleanupAction.
RunCmd runs cmd using args and returns its stdout and stderr.
RunCmdEnv runs cmd with the provided environment and args and returns its stdout and stderr.
RunHostCmd runs the given cmd in the context of the given pod using `kubectl exec` inside of a shell.
RunHostCmdOrDie calls RunHostCmd and dies on error.
RunHostCmdWithFullOutput runs the given cmd in the context of the given pod using `kubectl exec` inside of a shell.
RunHostCmdWithRetries calls RunHostCmd and retries all errors until it succeeds or the specified timeout expires.
RunKubectl is a convenience wrapper over kubectlBuilder.
RunKubectlInput is a convenience wrapper over kubectlBuilder that takes input to stdin.
RunKubectlOrDie is a convenience wrapper over kubectlBuilder.
RunKubectlOrDieInput is a convenience wrapper over kubectlBuilder that takes input to stdin.
RunKubectlWithFullOutput is a convenience wrapper over kubectlBuilder It will also return the command's stderr.
RunKubemciCmd is a convenience wrapper over kubectlBuilder to run kubemci.
RunKubemciWithKubeconfig is a convenience wrapper over RunKubemciCmd.
SetupProviderConfig validates the chosen provider and creates an interface instance for it.
StartCmdAndStreamOutput returns stdout and stderr after starting the given cmd.
TryKill is rough equivalent of ctrl+c for cleaning up processes.
WaitForAllNodesSchedulable waits up to timeout for all (but TestContext.AllowedNotReadyNodes) to become schedulable.
WaitForDefaultServiceAccountInNamespace waits for the default service account to be provisioned the default service account is what is associated with pods when they do not specify a service account as a result, pods are not able to be provisioned in a namespace until the service account is provisioned.
WaitForGroupSize waits for node instance group reached the desired size.
WaitForNamespacesDeleted waits for the namespaces to be deleted.
WaitForServiceEndpointsNum waits until the amount of endpoints that implement service to expectNum.
WaitForSSHTunnels waits for establishing SSH tunnel to busybox pod.
WatchEventSequenceVerifier ..
# Constants
AllContainers specifies that all containers be visited Copied from pkg/api/v1/pod to avoid pulling extra dependencies.
AllNodes means all containers on all nodes.
ClaimProvisionShortTimeout is same as `ClaimProvisionTimeout` to wait for claim to be dynamically provisioned, but shorter.
ClaimProvisionTimeout is how long claims have to become dynamically provisioned.
Containers is for normal containers.
DefaultNamespaceDeletionTimeout is timeout duration for waiting for a namespace deletion.
DefaultNumNodes is the number of nodes.
DefaultPodDeletionTimeout is the default timeout for deleting pod.
EphemeralContainers is for ephemeral containers.
FeatureEphemeralContainers allows running an ephemeral container in pod namespaces to troubleshoot a running pod.
InitContainers is for init containers.
KubeControllerManagerPort is the default port for the controller manager status server.
KubeletPort is the default port for the kubelet server on each host machine.
MasterAndDNSNodes means all containers on Master nodes and DNS containers on other nodes.
MasterNodes means all containers on Master nodes only.
NodeReadyInitialTimeout is how long nodes have to be "ready" when a test begins.
PodDeleteTimeout is how long to wait for a pod to be deleted.
PodEventTimeout is how much we wait for a pod event to occur.
PodGetTimeout is how long to wait for a pod to be got.
PodListTimeout is how long to wait for the pod to be listable.
PodReadyBeforeTimeout is how long pods have to be "ready" when a test begins.
PodStartShortTimeout is same as `PodStartTimeout` to wait for the pod to be started, but shorter.
PodStartTimeout is how long to wait for the pod to be started.
Poll is how often to Poll pods, nodes and claims.
PollShortTimeout is the short timeout value in polling.
RestartNodeReadyAgainTimeout is how long a node is allowed to become "Ready" after it is restarted before the test is considered failed.
RestartPodReadyAgainTimeout is how long a pod is allowed to become "running" and "ready" after a node restart before test is considered failed.
ServiceAccountProvisionTimeout is how long to wait for a service account to be provisioned.
ServiceStartTimeout is how long to wait for a service endpoint to be resolvable.
SingleCallTimeout is how long to try single API calls (like 'get' or 'list').
SnapshotCreateTimeout is how long for snapshot to create snapshotContent.
SnapshotDeleteTimeout is how long for snapshot to delete snapshotContent.
# Variables
BusyBoxImage is the image URI of BusyBox.
ImagePrePullList is the images used in the current test suite.
ProvidersWithSSH are those providers where each node is accessible with SSH.
RunID is a unique identifier of the e2e run.
ServeHostnameImage is a serve hostname image name.
TestContext should be used by all tests to access common context data.
# Structs
CloudConfig holds the cloud configuration for e2e test suites.
ClusterVerification is a struct for a verification of cluster state.
ContainerResourceGatherer is a struct for gathering container resource.
ContainerResourceUsage is a structure for gathering container resource usage.
ExecOptions passed to ExecWithOptions.
FlakeReport is a struct for managing the flake report.
Framework supports common operations used by e2e tests; it will keep a client & a namespace for you.
KubeCluster is a struct for managing kubernetes cluster info.
KubeConfig is a struct for managing kubernetes config.
KubectlBuilder is used to build, customize and execute a kubectl Command.
KubeUser is a struct for managing kubernetes user info.
LogSizeGatherer is a worker which grabs a WorkItem from the channel and does assigned work.
LogsSizeData is a structure for handling timeseries of log size data and lock.
LogsSizeVerifier gathers data about log files sizes from master and node machines.
NodeKiller is a utility to simulate node failures.
NodeKillerConfig describes configuration of NodeKiller -- a utility to simulate node failures.
NodeTestContextType is part of TestContextType, it is shared by all node e2e test.
NullProvider is the default implementation of the ProviderInterface which doesn't do anything.
Options is a struct for managing test framework options.
PodClient is a struct for pod client.
PodStateVerification represents a verification of pod state.
ResourceConstraint is a struct to hold constraints.
ResourceGathererOptions is a struct to hold options for resource.
SingleContainerSummary is a struct to hold single container summary.
SingleLogSummary is a structure for handling average generation rate and number of probes.
TestContextType contains test settings and global state.
TimeoutContext contains timeout settings for several actions.
TimestampedSize contains a size together with a time of measurement.
WorkItem is a command for a worker that contains an IP of machine from which we want to gather data and paths to all files we're interested in.
# Interfaces
ProviderInterface contains the implementation for certain provider-specific functionality.
TestDataSummary is an interface for managing test data.
# Type aliases
AfterEachActionFunc is a function that can be called after each test.
ClientConfigGetter is a func that returns getter to return a config.
ContainerType signifies container type.
ContainerVisitor is called with each container spec, and returns true if visiting should continue.
CreateTestingNSFn is a func that is responsible for creating namespace used for executing e2e tests.
EventsLister is a func that lists events.
Factory is a func which operates provider specific behavior.
LogSizeDataTimeseries is map of timestamped size.
LogsSizeDataSummary is map of log summary.
NodesSet is a value of nodes set.
ResourceUsagePerContainer is map of ContainerResourceUsage.
ResourceUsageSummary is a struct to hold resource usage summary.