Documentation ¶
Index ¶
- Variables
- func ArtifactDirPath() string
- func ArtifactPath(elem ...string) string
- func BuildAuthConfiguration(credKey string, oc *CLI) (*dockerClient.AuthConfiguration, error)
- func CheckForBuildEvent(client kcoreclient.CoreV1Interface, build *buildapi.Build, ...)
- func CheckOpenShiftNamespaceImageStreams(oc *CLI)
- func CleanupHostPathVolumes(c kcoreclient.PersistentVolumeInterface, prefix string) error
- func CreateExecPodOrFail(client kcoreclient.CoreV1Interface, ns, name string) string
- func CreatePersistentVolume(name, capacity, hostPath string) *kapiv1.PersistentVolume
- func CreateResource(jsonFilePath string, oc *CLI) error
- func DumpAndReturnTagging(tags []string) ([]string, error)
- func DumpApplicationPodLogs(dcName string, oc *CLI)
- func DumpBuildLogs(bc string, oc *CLI)
- func DumpBuilds(oc *CLI)
- func DumpDeploymentLogs(dcName string, version int64, oc *CLI)
- func DumpImageStreams(oc *CLI)
- func DumpPodLogs(pods []kapiv1.Pod, oc *CLI)
- func DumpPodLogsStartingWith(prefix string, oc *CLI)
- func DumpPodStates(oc *CLI)
- func ExamineDiskUsage()
- func ExaminePodDiskUsage(oc *CLI)
- func ExecuteTest(t *testing.T, suite string)
- func FatalErr(msg interface{})
- func FetchURL(url string, retryTimeout time.Duration) (response string, err error)
- func FixturePath(elem ...string) string
- func GetApplicationPods(oc *CLI, dcName string) (*kapiv1.PodList, error)
- func GetDeploymentConfigPods(oc *CLI, dcName string, version int64) (*kapiv1.PodList, error)
- func GetDockerImageReference(c imagetypeclientset.ImageStreamInterface, name, tag string) (string, error)
- func GetEndpointAddress(oc *CLI, name string) (string, error)
- func GetImageIDForTags(comps []string) ([]string, error)
- func GetMasterThreadDump(oc *CLI)
- func GetPodForContainer(container kapiv1.Container) *kapiv1.Pod
- func GetPodNamesByFilter(c kcoreclient.PodInterface, label labels.Selector, ...) (podNames []string, err error)
- func InitTest()
- func KubeConfigPath() string
- func ListImages() ([]string, error)
- func NewPodExecutor(oc *CLI, name, image string) (*podExecutor, error)
- func ParseLabelsOrDie(str string) labels.Selector
- func SetupHostPathVolumes(c kcoreclient.PersistentVolumeInterface, prefix, capacity string, count int) (volumes []*kapiv1.PersistentVolume, err error)
- func StartBuild(oc *CLI, args ...string) (stdout, stderr string, err error)
- func TimedWaitForAnImageStreamTag(oc *CLI, namespace, name, tag string, waitTimeout time.Duration) error
- func VarSubOnFile(srcFile string, destFile string, vars map[string]string) error
- func WaitForABuild(c buildtypedclientset.BuildResourceInterface, name string, ...) error
- func WaitForAJob(c kbatchclient.JobInterface, name string, timeout time.Duration) error
- func WaitForAnImageStream(client imagetypeclientset.ImageStreamInterface, name string, ...) error
- func WaitForAnImageStreamTag(oc *CLI, namespace, name, tag string) error
- func WaitForBuildResult(c buildtypedclientset.BuildResourceInterface, result *BuildResult) error
- func WaitForBuilderAccount(c kcoreclient.ServiceAccountInterface) error
- func WaitForDeploymentConfig(kc kclientset.Interface, dcClient appstypeclientset.DeploymentConfigsGetter, ...) error
- func WaitForOpenShiftNamespaceImageStreams(oc *CLI) error
- func WaitForPods(c kcoreclient.PodInterface, label labels.Selector, ...) ([]string, error)
- func WaitForQueryOutputContains(oc *CLI, d Database, timeout time.Duration, admin bool, ...) error
- func WaitForQueryOutputSatisfies(oc *CLI, d Database, timeout time.Duration, admin bool, query string, ...) error
- func WaitForResourceQuotaSync(client kinternalcoreclient.ResourceQuotaInterface, name string, ...) (kapi.ResourceList, error)
- func WaitForSelfSAR(interval, timeout time.Duration, c kclientset.Interface, ...) error
- func WaitForUserBeAuthorized(oc *CLI, user, verb, resource string) error
- func WaitUntilAllHelpersAreUp(oc *CLI, helpers []Database) error
- func WaitUntilPodIsGone(c kcoreclient.PodInterface, podName string, timeout time.Duration) error
- func WaitUntilUp(oc *CLI, d Database, timeout time.Duration) error
- type BuildResult
- type CLI
- func (c *CLI) AdminAppsClient() appsclientset.Interface
- func (c *CLI) AdminAuthorizationClient() authorizationclientset.Interface
- func (c *CLI) AdminBuildClient() buildclientset.Interface
- func (c *CLI) AdminImageClient() imageclientset.Interface
- func (c *CLI) AdminKubeClient() kclientset.Interface
- func (c *CLI) AdminProjectClient() projectclientset.Interface
- func (c *CLI) AdminRouteClient() routeclientset.Interface
- func (c *CLI) AdminTemplateClient() templateclientset.Interface
- func (c *CLI) AdminUserClient() userclientset.Interface
- func (c *CLI) AppsClient() appsclientset.Interface
- func (c *CLI) Args(args ...string) *CLI
- func (c *CLI) AsAdmin() *CLI
- func (c *CLI) AuthorizationClient() authorizationclientset.Interface
- func (c *CLI) Background() (*exec.Cmd, *bytes.Buffer, *bytes.Buffer, error)
- func (c *CLI) BackgroundRC() (*exec.Cmd, io.ReadCloser, error)
- func (c *CLI) BuildClient() buildclientset.Interface
- func (c *CLI) ChangeUser(name string) *CLI
- func (c *CLI) Execute() error
- func (c *CLI) ImageClient() imageclientset.Interface
- func (c *CLI) InputString(input string) *CLI
- func (c *CLI) InternalAdminKubeClient() kinternalclientset.Interface
- func (c *CLI) InternalKubeClient() kinternalclientset.Interface
- func (c *CLI) KubeClient() kclientset.Interface
- func (c *CLI) KubeFramework() *e2e.Framework
- func (c *CLI) Namespace() string
- func (c *CLI) Output() (string, error)
- func (c *CLI) OutputToFile(filename string) (string, error)
- func (c *CLI) Outputs() (string, string, error)
- func (c *CLI) ProjectClient() projectclientset.Interface
- func (c *CLI) RouteClient() routeclientset.Interface
- func (c *CLI) Run(commands ...string) *CLI
- func (c *CLI) SetNamespace(ns string) *CLI
- func (c *CLI) SetOutputDir(dir string) *CLI
- func (c *CLI) SetupProject(name string, kubeClient kclientset.Interface, _ map[string]string) (*kapiv1.Namespace, error)
- func (c *CLI) Stdout() io.Writer
- func (c *CLI) Template(t string) *CLI
- func (c *CLI) TemplateClient() templateclientset.Interface
- func (c *CLI) UserClient() userclientset.Interface
- func (c *CLI) Username() string
- func (c *CLI) Verbose() *CLI
- func (c CLI) WithoutNamespace() *CLI
- type Database
- type ExitError
- type LogDumperFunc
- type MissingTagError
- type ReplicaSet
- type SimpleReporter
- func (r *SimpleReporter) AfterSuiteDidRun(setupSummary *types.SetupSummary)
- func (r *SimpleReporter) BeforeSuiteDidRun(*types.SetupSummary)
- func (r *SimpleReporter) SpecDidComplete(spec *types.SpecSummary)
- func (r *SimpleReporter) SpecSuiteDidEnd(summary *types.SuiteSummary)
- func (r *SimpleReporter) SpecSuiteWillBegin(config config.GinkgoConfigType, summary *types.SuiteSummary)
- func (r *SimpleReporter) SpecWillRun(spec *types.SpecSummary)
Constants ¶
This section is empty.
Variables ¶
var CheckBuildCancelledFn = func(b *buildapi.Build) bool { return b.Status.Phase == buildapi.BuildPhaseCancelled }
CheckBuildCancelledFn return true if the build was canceled
var CheckBuildFailedFn = func(b *buildapi.Build) bool { return b.Status.Phase == buildapi.BuildPhaseFailed || b.Status.Phase == buildapi.BuildPhaseError }
CheckBuildFailedFn return true if the build failed
var CheckBuildSuccessFn = func(b *buildapi.Build) bool { return b.Status.Phase == buildapi.BuildPhaseComplete }
CheckBuildSuccessFn returns true if the build succeeded
var CheckImageStreamLatestTagPopulatedFn = func(i *imageapi.ImageStream) bool {
_, ok := i.Status.Tags["latest"]
return ok
}
CheckImageStreamLatestTagPopulatedFn returns true if the imagestream has a ':latest' tag filed
var CheckImageStreamTagNotFoundFn = func(i *imageapi.ImageStream) bool { return strings.Contains(i.Annotations[imageapi.DockerImageRepositoryCheckAnnotation], "not") || strings.Contains(i.Annotations[imageapi.DockerImageRepositoryCheckAnnotation], "error") }
CheckImageStreamTagNotFoundFn return true if the imagestream update was not successful
var CheckPodIsReadyFn = func(pod kapiv1.Pod) bool { if pod.Status.Phase != kapiv1.PodRunning { return false } for _, cond := range pod.Status.Conditions { if cond.Type != kapiv1.PodReady { continue } return cond.Status == kapiv1.ConditionTrue } return false }
CheckPodIsReadyFn returns true if the pod's ready probe determined that the pod is ready.
var CheckPodIsRunningFn = func(pod kapiv1.Pod) bool { return pod.Status.Phase == kapiv1.PodRunning }
CheckPodIsRunningFn returns true if the pod is running
var CheckPodIsSucceededFn = func(pod kapiv1.Pod) bool { return pod.Status.Phase == kapiv1.PodSucceeded }
CheckPodIsSucceededFn returns true if the pod status is "Succdeded"
var TestContext *e2e.TestContextType = &e2e.TestContext
Functions ¶
func ArtifactDirPath ¶ added in v1.0.7
func ArtifactDirPath() string
ArtifactDirPath returns the value of ARTIFACT_DIR environment variable
func ArtifactPath ¶ added in v1.0.7
ArtifactPath returns the absolute path to the fix artifact file The path is relative to ARTIFACT_DIR
func BuildAuthConfiguration ¶ added in v1.0.7
func BuildAuthConfiguration(credKey string, oc *CLI) (*dockerClient.AuthConfiguration, error)
BuildAuthConfiguration constructs a non-standard dockerClient.AuthConfiguration that can be used to communicate with the openshift internal docker registry
func CheckForBuildEvent ¶
func CheckForBuildEvent(client kcoreclient.CoreV1Interface, build *buildapi.Build, reason, message string)
CheckForBuildEvent will poll a build for up to 1 minute looking for an event with the specified reason and message template.
func CheckOpenShiftNamespaceImageStreams ¶ added in v1.3.0
func CheckOpenShiftNamespaceImageStreams(oc *CLI)
CheckOpenShiftNamespaceImageStreams is a temporary workaround for the intermittent issue seen in extended tests where *something* is deleteing the pre-loaded, languange imagestreams from the OpenShift namespace
func CleanupHostPathVolumes ¶ added in v1.0.7
func CleanupHostPathVolumes(c kcoreclient.PersistentVolumeInterface, prefix string) error
CleanupHostPathVolumes removes all PersistentVolumes created by SetupHostPathVolumes, with a given prefix
func CreateExecPodOrFail ¶ added in v1.5.0
func CreateExecPodOrFail(client kcoreclient.CoreV1Interface, ns, name string) string
CreateExecPodOrFail creates a simple busybox pod in a sleep loop used as a vessel for kubectl exec commands. Returns the name of the created pod. TODO: expose upstream
func CreatePersistentVolume ¶ added in v1.0.7
func CreatePersistentVolume(name, capacity, hostPath string) *kapiv1.PersistentVolume
CreatePersistentVolume creates a HostPath Persistent Volume.
func CreateResource ¶ added in v1.0.7
CreateResource creates the resources from the supplied json file (not a template); ginkgo error checking included
func DumpAndReturnTagging ¶ added in v1.0.7
DumpAndReturnTagging takes and array of tags and obtains the hex image IDs, dumps them to ginkgo for printing, and then returns them
func DumpApplicationPodLogs ¶
DumpApplicationPodLogs will dump the latest application logs for a DeploymentConfig for debug purposes
func DumpBuildLogs ¶ added in v1.2.0
DumpBuildLogs will dump the latest build logs for a BuildConfig for debug purposes
func DumpBuilds ¶
func DumpBuilds(oc *CLI)
DumpBuilds will dump the yaml for every build in the test namespace; remember, pipeline builds don't have build pods so a generic framework dump won't cat our pipeline builds objs in openshift
func DumpDeploymentLogs ¶ added in v1.3.0
DumpDeploymentLogs will dump the latest deployment logs for a DeploymentConfig for debug purposes
func DumpImageStreams ¶ added in v1.3.0
func DumpImageStreams(oc *CLI)
DumpImageStreams will dump both the openshift namespace and local namespace imagestreams as part of debugging when the language imagestreams in the openshift namespace seem to disappear
func DumpPodLogs ¶
func DumpPodLogsStartingWith ¶
DumpPodLogsStartingWith will dump any pod starting with the name prefix provided
func DumpPodStates ¶
func DumpPodStates(oc *CLI)
func ExamineDiskUsage ¶ added in v1.2.0
func ExamineDiskUsage()
ExamineDiskUsage will dump df output on the testing system; leveraging this as part of diagnosing the registry's disk filling up during external tests on jenkins
func ExaminePodDiskUsage ¶ added in v1.3.0
func ExaminePodDiskUsage(oc *CLI)
ExaminePodDiskUsage will dump df/du output on registry pod; leveraging this as part of diagnosing the registry's disk filling up during external tests on jenkins
func ExecuteTest ¶ added in v1.0.7
func FatalErr ¶
func FatalErr(msg interface{})
FatalErr exits the test in case a fatal error has occurred.
func FetchURL ¶ added in v1.0.7
FetchURL grabs the output from the specified url and returns it. It will retry once per second for duration retryTimeout if an error occurs during the request.
func FixturePath ¶
FixturePath returns an absolute path to a fixture file in test/extended/testdata/, test/integration/, or examples/.
func GetDeploymentConfigPods ¶ added in v1.5.0
func GetDockerImageReference ¶
func GetDockerImageReference(c imagetypeclientset.ImageStreamInterface, name, tag string) (string, error)
GetDockerImageReference retrieves the full Docker pull spec from the given ImageStream and tag
func GetEndpointAddress ¶ added in v1.0.7
GetEndpointAddress will return an "ip:port" string for the endpoint.
func GetImageIDForTags ¶
GetImageIDForTags will obtain the hexadecimal IDs for the array of human readible image tags IDs provided
func GetMasterThreadDump ¶
func GetMasterThreadDump(oc *CLI)
GetMasterThreadDump will get a golang thread stack dump
func GetPodForContainer ¶ added in v1.0.7
GetPodForContainer creates a new Pod that runs specified container
func GetPodNamesByFilter ¶ added in v1.0.7
func GetPodNamesByFilter(c kcoreclient.PodInterface, label labels.Selector, predicate func(kapiv1.Pod) bool) (podNames []string, err error)
GetPodNamesByFilter looks up pods that satisfy the predicate and returns their names.
func InitTest ¶ added in v1.0.7
func InitTest()
init initialize the extended testing suite. You can set these environment variables to configure extended tests: KUBECONFIG - Path to kubeconfig containing embedded authinfo TEST_REPORT_DIR - If set, JUnit output will be written to this directory for each test TEST_REPORT_FILE_NAME - If set, will determine the name of the file that JUnit output is written to
func KubeConfigPath ¶
func KubeConfigPath() string
KubeConfigPath returns the value of KUBECONFIG environment variable
func ListImages ¶ added in v1.3.0
ListImages initiates the equivalent of a `docker images`
func NewPodExecutor ¶
NewPodExecutor returns an executor capable of running commands in a Pod.
func ParseLabelsOrDie ¶ added in v1.0.7
ParseLabelsOrDie turns the given string into a label selector or panics; for tests or other cases where you know the string is valid. TODO: Move this to the upstream labels package.
func SetupHostPathVolumes ¶ added in v1.0.7
func SetupHostPathVolumes(c kcoreclient.PersistentVolumeInterface, prefix, capacity string, count int) (volumes []*kapiv1.PersistentVolume, err error)
SetupHostPathVolumes will create multiple PersistentVolumes with given capacity
func StartBuild ¶
StartBuild executes OC start-build with the specified arguments. StdOut and StdErr from the process are returned as separate strings.
func TimedWaitForAnImageStreamTag ¶ added in v1.4.0
func TimedWaitForAnImageStreamTag(oc *CLI, namespace, name, tag string, waitTimeout time.Duration) error
TimedWaitForAnImageStreamTag waits until an image stream with given name has non-empty history for given tag. Gives up waiting after the specified waitTimeout
func VarSubOnFile ¶ added in v1.0.7
VarSubOnFile reads in srcFile, finds instances of ${key} from the map and replaces them with their associated values.
func WaitForABuild ¶
func WaitForABuild(c buildtypedclientset.BuildResourceInterface, name string, isOK, isFailed, isCanceled func(*buildapi.Build) bool) error
WaitForABuild waits for a Build object to match either isOK or isFailed conditions.
func WaitForAJob ¶ added in v1.3.0
func WaitForAJob(c kbatchclient.JobInterface, name string, timeout time.Duration) error
func WaitForAnImageStream ¶ added in v1.0.6
func WaitForAnImageStream(client imagetypeclientset.ImageStreamInterface, name string, isOK, isFailed func(*imageapi.ImageStream) bool) error
WaitForAnImageStream waits for an ImageStream to fulfill the isOK function
func WaitForAnImageStreamTag ¶ added in v1.3.0
WaitForAnImageStreamTag waits until an image stream with given name has non-empty history for given tag. Defaults to waiting for 300 seconds
func WaitForBuildResult ¶
func WaitForBuildResult(c buildtypedclientset.BuildResourceInterface, result *BuildResult) error
WaitForBuildResult updates result wit the state of the build
func WaitForBuilderAccount ¶ added in v1.0.6
func WaitForBuilderAccount(c kcoreclient.ServiceAccountInterface) error
WaitForBuilderAccount waits until the builder service account gets fully provisioned
func WaitForDeploymentConfig ¶
func WaitForDeploymentConfig(kc kclientset.Interface, dcClient appstypeclientset.DeploymentConfigsGetter, namespace, name string, version int64, cli *CLI) error
WaitForDeploymentConfig waits for a DeploymentConfig to complete transition to a given version and report minimum availability.
func WaitForOpenShiftNamespaceImageStreams ¶ added in v1.3.0
WaitForOpenShiftNamespaceImageStreams waits for the standard set of imagestreams to be imported
func WaitForPods ¶ added in v1.0.7
func WaitForPods(c kcoreclient.PodInterface, label labels.Selector, predicate func(kapiv1.Pod) bool, count int, timeout time.Duration) ([]string, error)
WaitForPods waits until given number of pods that match the label selector and satisfy the predicate are found
func WaitForQueryOutputContains ¶ added in v1.1.5
func WaitForQueryOutputContains(oc *CLI, d Database, timeout time.Duration, admin bool, query, resultSubstr string) error
WaitForQueryOutputContains will execute the query multiple times, until the specified substring is found in the results. This function should be used for testing replication, since it might take some time until the data is propagated to slaves.
func WaitForQueryOutputSatisfies ¶ added in v1.1.5
func WaitForQueryOutputSatisfies(oc *CLI, d Database, timeout time.Duration, admin bool, query string, predicate func(string) bool) error
WaitForQueryOutputSatisfies will execute the query multiple times, until the specified predicate function is return true.
func WaitForResourceQuotaSync ¶ added in v1.1.4
func WaitForResourceQuotaSync( client kinternalcoreclient.ResourceQuotaInterface, name string, expectedUsage kapi.ResourceList, expectedIsUpperLimit bool, timeout time.Duration, ) (kapi.ResourceList, error)
WaitForResourceQuotaSync watches given resource quota until its usage is updated to desired level or a timeout occurs. If successful, used quota values will be returned for expected resources. Otherwise an ErrWaitTimeout will be returned. If expectedIsUpperLimit is true, given expected usage must compare greater or equal to quota's usage, which is useful for expected usage increment. Otherwise expected usage must compare lower or equal to quota's usage, which is useful for expected usage decrement.
func WaitForSelfSAR ¶
func WaitForSelfSAR(interval, timeout time.Duration, c kclientset.Interface, selfSAR authorizationapiv1.SelfSubjectAccessReviewSpec) error
func WaitForUserBeAuthorized ¶
WaitForUserBeAuthorized waits a minute until the cluster bootstrap roles are available and the provided user is authorized to perform the action on the resource.
func WaitUntilAllHelpersAreUp ¶ added in v1.0.7
WaitUntilAllHelpersAreUp waits until all helpers are ready to serve requests.
func WaitUntilPodIsGone ¶ added in v1.0.7
func WaitUntilPodIsGone(c kcoreclient.PodInterface, podName string, timeout time.Duration) error
WaitUntilPodIsGone waits until the named Pod will disappear
Types ¶
type BuildResult ¶ added in v1.3.0
type BuildResult struct { // BuildPath is a resource qualified name (e.g. "build/test-1"). BuildPath string // BuildName is the non-resource qualified name. BuildName string // StartBuildStdErr is the StdErr output generated by oc start-build. StartBuildStdErr string // StartBuildStdOut is the StdOut output generated by oc start-build. StartBuildStdOut string // StartBuildErr is the error, if any, returned by the direct invocation of the start-build command. StartBuildErr error // The buildconfig which generated this build. BuildConfigName string // Build is the resource created. May be nil if there was a timeout. Build *buildapi.Build // BuildAttempt represents that a Build resource was created. // false indicates a severe error unrelated to Build success or failure. BuildAttempt bool // BuildSuccess is true if the build was finshed successfully. BuildSuccess bool // BuildFailure is true if the build was finished with an error. BuildFailure bool // BuildCancelled is true if the build was canceled. BuildCancelled bool // BuildTimeout is true if there was a timeout waiting for the build to finish. BuildTimeout bool // Alternate log dumper function. If set, this is called instead of 'oc logs' LogDumper LogDumperFunc // The openshift client which created this build. Oc *CLI }
func NewBuildResult ¶
func NewBuildResult(oc *CLI, build *buildapi.Build) *BuildResult
func StartBuildAndWait ¶ added in v1.3.0
func StartBuildAndWait(oc *CLI, args ...string) (result *BuildResult, err error)
StartBuildAndWait executes OC start-build with the specified arguments on an existing buildconfig. Note that start-build will be run with "-o=name" as a parameter when using this method. If no error is returned from this method, it means that the build attempted successfully, NOT that the build completed. For completion information, check the BuildResult object.
func StartBuildResult ¶ added in v1.5.0
func StartBuildResult(oc *CLI, args ...string) (result *BuildResult, err error)
func (*BuildResult) AssertFailure ¶ added in v1.3.0
func (t *BuildResult) AssertFailure() *BuildResult
Dumps logs and triggers a Ginkgo assertion if the build did NOT have an error (this will not assert on timeouts)
func (*BuildResult) AssertSuccess ¶ added in v1.3.0
func (t *BuildResult) AssertSuccess() *BuildResult
Dumps logs and triggers a Ginkgo assertion if the build did NOT succeed.
func (*BuildResult) DumpLogs ¶ added in v1.3.0
func (t *BuildResult) DumpLogs()
DumpLogs sends logs associated with this BuildResult to the GinkgoWriter.
func (*BuildResult) Logs ¶ added in v1.3.0
func (t *BuildResult) Logs() (string, error)
Logs returns the logs associated with this build.
type CLI ¶
type CLI struct {
// contains filtered or unexported fields
}
CLI provides function to call the OpenShift CLI and Kubernetes and OpenShift clients.
func NewCLI ¶
NewCLI initialize the upstream E2E framework and set the namespace to match with the project name. Note that this function does not initialize the project role bindings for the namespace.
func (*CLI) AdminAppsClient ¶
func (c *CLI) AdminAppsClient() appsclientset.Interface
func (*CLI) AdminAuthorizationClient ¶
func (c *CLI) AdminAuthorizationClient() authorizationclientset.Interface
func (*CLI) AdminBuildClient ¶
func (c *CLI) AdminBuildClient() buildclientset.Interface
func (*CLI) AdminImageClient ¶
func (c *CLI) AdminImageClient() imageclientset.Interface
func (*CLI) AdminKubeClient ¶ added in v1.5.0
func (c *CLI) AdminKubeClient() kclientset.Interface
AdminKubeClient provides a Kubernetes client for the cluster admin user.
func (*CLI) AdminProjectClient ¶
func (c *CLI) AdminProjectClient() projectclientset.Interface
func (*CLI) AdminRouteClient ¶
func (c *CLI) AdminRouteClient() routeclientset.Interface
func (*CLI) AdminTemplateClient ¶
func (c *CLI) AdminTemplateClient() templateclientset.Interface
AdminClient provides an OpenShift client for the cluster admin user.
func (*CLI) AdminUserClient ¶
func (c *CLI) AdminUserClient() userclientset.Interface
func (*CLI) AppsClient ¶
func (c *CLI) AppsClient() appsclientset.Interface
func (*CLI) AuthorizationClient ¶
func (c *CLI) AuthorizationClient() authorizationclientset.Interface
func (*CLI) Background ¶ added in v1.3.0
Background executes the command in the background and returns the Cmd object which may be killed later via cmd.Process.Kill(). It also returns buffers holding the stdout & stderr of the command, which may be read from only after calling cmd.Wait().
func (*CLI) BackgroundRC ¶
BackgroundRC executes the command in the background and returns the Cmd object which may be killed later via cmd.Process.Kill(). It returns a ReadCloser for stdout. If in doubt, use Background(). Consult the os/exec documentation.
func (*CLI) BuildClient ¶
func (c *CLI) BuildClient() buildclientset.Interface
func (*CLI) ChangeUser ¶
ChangeUser changes the user used by the current CLI session.
func (*CLI) Execute ¶
Execute executes the current command and return error if the execution failed This function will set the default output to Ginkgo writer.
func (*CLI) ImageClient ¶
func (c *CLI) ImageClient() imageclientset.Interface
func (*CLI) InputString ¶ added in v1.0.7
InputString adds expected input to the command
func (*CLI) InternalAdminKubeClient ¶
func (c *CLI) InternalAdminKubeClient() kinternalclientset.Interface
AdminKubeClient provides a Kubernetes client for the cluster admin user.
func (*CLI) InternalKubeClient ¶
func (c *CLI) InternalKubeClient() kinternalclientset.Interface
KubeClient provides a Kubernetes client for the current namespace
func (*CLI) KubeClient ¶ added in v1.5.0
func (c *CLI) KubeClient() kclientset.Interface
KubeClient provides a Kubernetes client for the current namespace
func (*CLI) KubeFramework ¶
KubeFramework returns Kubernetes framework which contains helper functions specific for Kubernetes resources
func (*CLI) Namespace ¶
Namespace returns the name of the namespace used in the current test case. If the namespace is not set, an empty string is returned.
func (*CLI) OutputToFile ¶
OutputToFile executes the command and store output to a file
func (*CLI) Outputs ¶ added in v1.3.0
Outputs executes the command and returns the stdout/stderr output as separate strings
func (*CLI) ProjectClient ¶
func (c *CLI) ProjectClient() projectclientset.Interface
func (*CLI) RouteClient ¶
func (c *CLI) RouteClient() routeclientset.Interface
func (*CLI) Run ¶
Run executes given OpenShift CLI command verb (iow. "oc <verb>"). This function also override the default 'stdout' to redirect all output to a buffer and prepare the global flags such as namespace and config path.
func (*CLI) SetNamespace ¶
SetNamespace sets a new namespace
func (*CLI) SetOutputDir ¶
SetOutputDir change the default output directory for temporary files
func (*CLI) SetupProject ¶
func (c *CLI) SetupProject(name string, kubeClient kclientset.Interface, _ map[string]string) (*kapiv1.Namespace, error)
SetupProject creates a new project and assign a random user to the project. All resources will be then created within this project and Kubernetes E2E suite will destroy the project after test case finish.
func (*CLI) Template ¶
Template sets a Go template for the OpenShift CLI command. This is equivalent of running "oc get foo -o template --template='{{ .spec }}'"
func (*CLI) TemplateClient ¶
func (c *CLI) TemplateClient() templateclientset.Interface
Client provides an OpenShift client for the current user. If the user is not set, then it provides client for the cluster admin user
func (*CLI) UserClient ¶
func (c *CLI) UserClient() userclientset.Interface
func (*CLI) Username ¶
Username returns the name of currently logged user. If there is no user assigned for the current session, it returns 'admin'.
func (CLI) WithoutNamespace ¶ added in v1.4.0
WithoutNamespace instructs the command should be invoked without adding --namespace parameter
type Database ¶ added in v1.0.7
type Database interface { // PodName returns the name of the Pod this helper is bound to. PodName() string // IsReady indicates whether the underlying Pod is ready for queries. IsReady(oc *CLI) (bool, error) // Query queries the database as a regular user. Query(oc *CLI, query string) (string, error) // QueryPrivileged queries the database as a privileged user. QueryPrivileged(oc *CLI, query string) (string, error) // TestRemoteLogin tests whether it is possible to remote login to hostAddress. TestRemoteLogin(oc *CLI, hostAddress string) error }
Database interface allows testing database images.
type LogDumperFunc ¶
type LogDumperFunc func(oc *CLI, br *BuildResult) (string, error)
type MissingTagError ¶
type MissingTagError struct {
Tags []string
}
func (MissingTagError) Error ¶
func (mte MissingTagError) Error() string
type ReplicaSet ¶ added in v1.1.5
type ReplicaSet interface { // QueryPrimary queries the database on primary node as a regular user. QueryPrimary(oc *CLI, query string) (string, error) }
ReplicaSet interface allows to interact with database on multiple nodes.
type SimpleReporter ¶ added in v1.0.7
func NewSimpleReporter ¶ added in v1.0.7
func NewSimpleReporter() *SimpleReporter
func (*SimpleReporter) AfterSuiteDidRun ¶ added in v1.0.7
func (r *SimpleReporter) AfterSuiteDidRun(setupSummary *types.SetupSummary)
func (*SimpleReporter) BeforeSuiteDidRun ¶ added in v1.0.7
func (r *SimpleReporter) BeforeSuiteDidRun(*types.SetupSummary)
func (*SimpleReporter) SpecDidComplete ¶ added in v1.0.7
func (r *SimpleReporter) SpecDidComplete(spec *types.SpecSummary)
func (*SimpleReporter) SpecSuiteDidEnd ¶ added in v1.0.7
func (r *SimpleReporter) SpecSuiteDidEnd(summary *types.SuiteSummary)
func (*SimpleReporter) SpecSuiteWillBegin ¶ added in v1.0.7
func (r *SimpleReporter) SpecSuiteWillBegin(config config.GinkgoConfigType, summary *types.SuiteSummary)
func (*SimpleReporter) SpecWillRun ¶ added in v1.0.7
func (r *SimpleReporter) SpecWillRun(spec *types.SpecSummary)