Documentation
¶
Index ¶
- Variables
- func AddAnnotationsToSpecificResource(oc *CLI, resourceKindAndName, resourceNamespace string, annotations ...string) (string, error)
- func AddLabelsToSpecificResource(oc *CLI, resourceKindAndName, resourceNamespace string, labels ...string) (string, error)
- func ApplyClusterResourceFromTemplate(oc *CLI, parameters ...string)
- func ApplyClusterResourceFromTemplateWithError(oc *CLI, parameters ...string) error
- func AssertAllPodsToBeReady(oc *CLI, namespace string)
- func AssertAllPodsToBeReadyWithPollerParams(oc *CLI, namespace string, interval, timeout time.Duration, selector string)
- func AssertAllPodsToBeReadyWithSelector(oc *CLI, namespace, selector string)
- func AssertPodToBeReady(oc *CLI, podName, namespace string)
- func AssertWaitPollNoErr(e error, msg string)
- func By(text string)
- func CreateClusterResourceFromTemplate(oc *CLI, parameters ...string)
- func CreateClusterResourceFromTemplateWithError(oc *CLI, parameters ...string) error
- func CreateNsResourceFromTemplate(oc *CLI, namespace string, parameters ...string)
- func DebugNodeWithChroot(oc *CLI, nodeName string, cmd ...string) (string, error)
- func DeleteLabelsFromSpecificResource(oc *CLI, resourceKindAndName, resourceNamespace string, labelNames ...string) (string, error)
- func FixturePath(elem ...string) string
- func GenerateOAuthTokenPair() (privToken, pubToken string)
- func GetAnnotationsFromSpecificResource(oc *CLI, resourceKindAndName, resourceNamespace string) ([]string, error)
- func GetInfraID(oc *CLI) (string, error)
- func GetNodeListByLabel(oc *CLI, labelKey string) []string
- func GetPodName(oc *CLI, namespace, podLabel, node string) (string, error)
- func GetRandomString() string
- func GetResourceSpecificLabelValue(oc *CLI, resourceKindAndName, resourceNamespace, labelName string) (string, error)
- func GetSpecificPodLogs(oc *CLI, namespace, container, podName, filter string) (string, error)
- func GetSpecificPodLogsCombinedOrNot(oc *CLI, namespace, container, podName, filter string, combined bool) (string, error)
- func InitDefaultEnvironmentVariables()
- func InitStandardFlags()
- func InitTest(dryRun bool) error
- func IsDefaultNodeSelectorEnabled(oc *CLI) bool
- func IsNamespacePrivileged(oc *CLI, namespace string) (bool, error)
- func IsSpecifiedAnnotationKeyExist(oc *CLI, resourceKindAndName, resourceNamespace, annotationKey string) bool
- func IsWorkerNode(oc *CLI, nodeName string) bool
- func KubeConfigPath() string
- func OrFail[T any](vals ...any) T
- func RecoverNamespaceRestricted(oc *CLI, namespace string) error
- func RemoveAnnotationFromSpecificResource(oc *CLI, resourceKindAndName, resourceNamespace, annotationName string) (string, error)
- func SetNamespacePrivileged(oc *CLI, namespace string) error
- func StringsSliceContains(stringsSlice []string, element string) (bool, int)
- func StringsSliceElementsAddSuffix(stringsSlice []string, suffix string) []string
- func StringsSliceElementsHasPrefix(stringsSlice []string, elementPrefix string, sequentialFlag bool) (bool, int)
- func WaitForSelfSAR(interval, timeout time.Duration, c kclientset.Interface, ...) error
- func WaitForServiceAccount(c corev1client.ServiceAccountInterface, name string, checkSecret bool) error
- type CLI
- func (c *CLI) AddExplicitResourceToDelete(resource schema.GroupVersionResource, namespace, name string)
- func (c *CLI) AddPathsToDelete(dir string)
- func (c *CLI) AddResourceToDelete(resource schema.GroupVersionResource, metadata metav1.Object)
- func (c *CLI) AdminAPIExtensionsV1Client() crdv1.ApiextensionsV1Interface
- func (c *CLI) AdminAppsClient() appsv1client.Interface
- func (c *CLI) AdminAuthorizationClient() authorizationv1client.Interface
- func (c *CLI) AdminBuildClient() buildv1client.Interface
- func (c *CLI) AdminConfig() *rest.Config
- func (c *CLI) AdminConfigClient() configv1client.Interface
- func (c *CLI) AdminDynamicClient() dynamic.Interface
- func (c *CLI) AdminImageClient() imagev1client.Interface
- func (c *CLI) AdminKubeClient() kubernetes.Interface
- func (c *CLI) AdminOAuthClient() oauthv1client.Interface
- func (c *CLI) AdminOauthClient() oauthv1client.Interface
- func (c *CLI) AdminOperatorClient() operatorv1client.Interface
- func (c *CLI) AdminProjectClient() projectv1client.Interface
- func (c *CLI) AdminQuotaClient() quotav1client.Interface
- func (c *CLI) AdminRouteClient() routev1client.Interface
- func (c *CLI) AdminSecurityClient() securityv1client.Interface
- func (c *CLI) AdminTemplateClient() templatev1client.Interface
- func (c *CLI) AdminUserClient() userv1client.Interface
- func (c *CLI) AppsClient() appsv1client.Interface
- func (c *CLI) Args(args ...string) *CLI
- func (c *CLI) AsAdmin() *CLI
- func (c CLI) AsGuestKubeconf() *CLI
- func (c *CLI) AuthorizationClient() authorizationv1client.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() buildv1client.Interface
- func (c *CLI) ChangeUser(name string) *CLI
- func (c *CLI) CreateNamespace(ctx context.Context, labels map[string]string) (*corev1.Namespace, error)
- func (c *CLI) CreateSpecifiedNamespaceAsAdmin(namespace string)
- func (c *CLI) CreateUser(prefix string) *userv1.User
- func (c *CLI) DeleteSpecifiedNamespaceAsAdmin(namespace string)
- func (c *CLI) DynamicClient() dynamic.Interface
- func (c *CLI) Execute() error
- func (c *CLI) GetClientConfigForUser(username string) *rest.Config
- func (c *CLI) GetGuestKubeconf() string
- func (c *CLI) GetKubeconf() string
- func (c *CLI) GuestConfig() *rest.Config
- func (c *CLI) GuestKubeClient() kubernetes.Interface
- func (c *CLI) ImageClient() imagev1client.Interface
- func (c *CLI) InputString(input string) *CLI
- func (c *CLI) KubeClient() kubernetes.Interface
- func (c *CLI) KubeFramework() *e2e.Framework
- func (c *CLI) MustCreateNamespace(ctx context.Context, labels map[string]string) *corev1.Namespace
- func (c *CLI) Namespace() string
- func (c *CLI) NotShowInfo() *CLI
- func (c *CLI) Output() (string, error)
- func (c *CLI) OutputToFile(filename string) (string, error)
- func (c *CLI) Outputs() (string, string, error)
- func (c *CLI) OutputsToFiles(fileName string) (string, string, error)
- func (c *CLI) ProjectClient() projectv1client.Interface
- func (c *CLI) QuotaClient() quotav1client.Interface
- func (c *CLI) RESTMapper() meta.RESTMapper
- func (c *CLI) RouteClient() routev1client.Interface
- func (c *CLI) Run(commands ...string) *CLI
- func (c *CLI) SetAdminKubeconf(adminKubeconf string) *CLI
- func (c *CLI) SetGuestKubeconf(guestKubeconf string) *CLI
- func (c *CLI) SetKubeconf(kubeconf string) *CLI
- func (c *CLI) SetNamespace(ns string) *CLI
- func (c *CLI) SetShowInfo() *CLI
- func (c *CLI) SetupProject()
- func (c *CLI) SilentOutput() (string, error)
- func (c *CLI) TeardownProject()
- func (c *CLI) Template(t string) *CLI
- func (c *CLI) TemplateClient() templatev1client.Interface
- func (c *CLI) User() string
- func (c *CLI) UserConfig() *rest.Config
- func (c *CLI) Verbose() *CLI
- func (c CLI) WithKubectl() *CLI
- func (c CLI) WithoutKubeconf() *CLI
- func (c CLI) WithoutNamespace() *CLI
- type ExitError
- type Pod
- type SecureMatcher
Constants ¶
This section is empty.
Variables ¶
var (
TestContext = &e2e.TestContext
)
Functions ¶
func AddAnnotationsToSpecificResource ¶
func AddAnnotationsToSpecificResource(oc *CLI, resourceKindAndName, resourceNamespace string, annotations ...string) (string, error)
AddAnnotationsToSpecificResource adds the custom annotations to the specific resource
func AddLabelsToSpecificResource ¶
func AddLabelsToSpecificResource(oc *CLI, resourceKindAndName, resourceNamespace string, labels ...string) (string, error)
AddLabelsToSpecificResource adds the custom labels to the specific resource
func ApplyClusterResourceFromTemplate ¶
ApplyClusterResourceFromTemplate apply resource from the template. For ex: ApplyClusterResourceFromTemplate(oc, "--ignore-unknown-parameters=true", "-f", "TEMPLATE LOCATION")
func ApplyClusterResourceFromTemplateWithError ¶
ApplyClusterResourceFromTemplateWithError apply resource from the template and return error if happened. For ex: ApplyClusterResourceFromTemplateWithError(oc, "--ignore-unknown-parameters=true", "-f", "TEMPLATE LOCATION")
func AssertAllPodsToBeReady ¶
AssertAllPodsToBeReady assert all pods in NS are in ready state until timeout in a given namespace
func AssertAllPodsToBeReadyWithPollerParams ¶
func AssertAllPodsToBeReadyWithPollerParams(oc *CLI, namespace string, interval, timeout time.Duration, selector string)
AssertAllPodsToBeReadyWithPollerParams assert all pods in NS are in ready state until timeout in a given namespace Pros: allow user to customize poller parameters
func AssertAllPodsToBeReadyWithSelector ¶
AssertAllPodsToBeReadyWithSelector assert all pods in NS are in ready state until timeout in a given namespace The selector parameter follows the regular oc/kubectl format for the --selector option.
func AssertPodToBeReady ¶
AssertPodToBeReady poll pod status to determine it is ready
func AssertWaitPollNoErr ¶
func By ¶
func By(text string)
when 4.14 synch with k1.27, there is gingkgo upgrade from 2.4 to 26 By method changes and it does not print "STEP:" information. some tester want to use it. so, make this wrapper to print if you want to get "STEP:", you need to change g.By to exutil. By text is the string you want to describe the step.
func CreateClusterResourceFromTemplate ¶
CreateClusterResourceFromTemplate create resource from the template. For ex: CreateClusterResourceFromTemplate(oc, "--ignore-unknown-parameters=true", "-f", "TEMPLATE LOCATION")
func CreateClusterResourceFromTemplateWithError ¶
CreateClusterResourceFromTemplateWithError create resource from the template and return error if happened. For ex: CreateClusterResourceFromTemplateWithError(oc, "--ignore-unknown-parameters=true", "-f", "TEMPLATE LOCATION")
func CreateNsResourceFromTemplate ¶
CreateNsResourceFromTemplate create ns resource from the template. No need to add a namespace parameter in the template file as it can be provided as a function argument. For ex: CreateNsResourceFromTemplate(oc, "NAMESPACE", "--ignore-unknown-parameters=true", "-f", "TEMPLATE LOCATION")
func DebugNodeWithChroot ¶
DebugNodeWithChroot creates a debugging session of the node with chroot
func DeleteLabelsFromSpecificResource ¶
func DeleteLabelsFromSpecificResource(oc *CLI, resourceKindAndName, resourceNamespace string, labelNames ...string) (string, error)
DeleteLabelsFromSpecificResource deletes the custom labels from the specific resource
func FixturePath ¶
FixturePath returns an absolute path to a local copy of a fixture file This is a simplified version that doesn't depend on embedded testdata
func GenerateOAuthTokenPair ¶
func GenerateOAuthTokenPair() (privToken, pubToken string)
GenerateOAuthTokenPair returns two tokens to use with OpenShift OAuth-based authentication. The first token is a private token meant to be used as a Bearer token to send queries to the API, the second token is a hashed token meant to be stored in the database.
func GetAnnotationsFromSpecificResource ¶
func GetAnnotationsFromSpecificResource(oc *CLI, resourceKindAndName, resourceNamespace string) ([]string, error)
GetAnnotationsFromSpecificResource gets the annotations from the specific resource
func GetNodeListByLabel ¶
GetNodeListByLabel gets the node list by label
func GetPodName ¶
GetPodName returns the pod name
func GetResourceSpecificLabelValue ¶
func GetResourceSpecificLabelValue(oc *CLI, resourceKindAndName, resourceNamespace, labelName string) (string, error)
GetResourceSpecificLabelValue gets the specified label value from the resource and label name
func GetSpecificPodLogs ¶
GetSpecificPodLogs returns the pod logs by the specific filter
func GetSpecificPodLogsCombinedOrNot ¶
func GetSpecificPodLogsCombinedOrNot(oc *CLI, namespace, container, podName, filter string, combined bool) (string, error)
GetSpecificPodLogsCombinedOrNot returns the pod logs by the specific filter with combining stderr or not
func InitDefaultEnvironmentVariables ¶
func InitDefaultEnvironmentVariables()
ProwGCPSetup makes sure certain required env vars are available in the case that extended tests are invoked directly via calls to ginkgo/extended.test
func InitStandardFlags ¶
func InitStandardFlags()
func IsDefaultNodeSelectorEnabled ¶
IsDefaultNodeSelectorEnabled judges whether the test cluster enabled the defaultNodeSelector
func IsNamespacePrivileged ¶
IsNamespacePrivileged returns bool Judge whether the input namespace has the privileged label Privileged label: "pod-security.kubernetes.io/enforce=privileged"
func IsSpecifiedAnnotationKeyExist ¶
func IsSpecifiedAnnotationKeyExist(oc *CLI, resourceKindAndName, resourceNamespace, annotationKey string) bool
IsSpecifiedAnnotationKeyExist judges whether the specified annotationKey exist on the resource
func IsWorkerNode ¶
IsWorkerNode judges whether the node has the worker role
func KubeConfigPath ¶
func KubeConfigPath() string
KubeConfigPath returns the value of KUBECONFIG environment variable
func OrFail ¶
OrFail function will process another function's return values and fail if any of those returned values is ane error != nil and returns the first value example: if we have: func getValued() (string, error)
we can do: value := OrFail[string](getValue())
func RecoverNamespaceRestricted ¶
RecoverNamespaceRestricted removes the privileged labels from the input namespace
func RemoveAnnotationFromSpecificResource ¶
func RemoveAnnotationFromSpecificResource(oc *CLI, resourceKindAndName, resourceNamespace, annotationName string) (string, error)
RemoveAnnotationFromSpecificResource removes the specified annotation from the resource
func SetNamespacePrivileged ¶
SetNamespacePrivileged adds the privileged labels to the input namespace Privileged labels: "security.openshift.io/scc.podSecurityLabelSync=false", "pod-security.kubernetes.io/enforce=privileged", "pod-security.kubernetes.io/audit=privileged", "pod-security.kubernetes.io/warn=privileged" Without audit label "pod-security.kubernetes.io/audit=privileged", an important alert will fire on cluster after pod created https://github.com/openshift/cluster-kube-apiserver-operator/pull/1362 The warn label "pod-security.kubernetes.io/warn=privileged" is optional, it could make the warning info output gone.
func StringsSliceContains ¶
StringsSliceContains judges whether the strings Slice contains specific element, return bool and the first matched index If no matched return (false, 0)
func StringsSliceElementsAddSuffix ¶
StringsSliceElementsAddSuffix returns a new string slice all elements with the specific suffix added
func StringsSliceElementsHasPrefix ¶
func StringsSliceElementsHasPrefix(stringsSlice []string, elementPrefix string, sequentialFlag bool) (bool, int)
StringsSliceElementsHasPrefix judges whether the strings Slice contains an element which has the specific prefix returns bool and the first matched index sequential order: -> sequentialFlag: "true" reverse order: -> sequentialFlag: "false" If no matched return (false, 0)
func WaitForSelfSAR ¶
func WaitForSelfSAR(interval, timeout time.Duration, c kclientset.Interface, selfSAR authorizationapiv1.SelfSubjectAccessReviewSpec) error
func WaitForServiceAccount ¶
func WaitForServiceAccount(c corev1client.ServiceAccountInterface, name string, checkSecret bool) error
WaitForServiceAccount waits until the named service account gets fully provisioned
Types ¶
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) AddExplicitResourceToDelete ¶
func (c *CLI) AddExplicitResourceToDelete(resource schema.GroupVersionResource, namespace, name string)
AddExplicitResourceToDelete method
func (*CLI) AddResourceToDelete ¶
func (c *CLI) AddResourceToDelete(resource schema.GroupVersionResource, metadata metav1.Object)
AddResourceToDelete method
func (*CLI) AdminAPIExtensionsV1Client ¶
func (c *CLI) AdminAPIExtensionsV1Client() crdv1.ApiextensionsV1Interface
AdminAPIExtensionsV1Client returns a ClientSet for the APIExtensionsV1Beta1 API
func (*CLI) AdminAppsClient ¶
func (c *CLI) AdminAppsClient() appsv1client.Interface
AdminAppsClient method
func (*CLI) AdminAuthorizationClient ¶
func (c *CLI) AdminAuthorizationClient() authorizationv1client.Interface
AdminAuthorizationClient method
func (*CLI) AdminBuildClient ¶
func (c *CLI) AdminBuildClient() buildv1client.Interface
AdminBuildClient method
func (*CLI) AdminConfigClient ¶
func (c *CLI) AdminConfigClient() configv1client.Interface
AdminConfigClient method
func (*CLI) AdminDynamicClient ¶
AdminDynamicClient method
func (*CLI) AdminImageClient ¶
func (c *CLI) AdminImageClient() imagev1client.Interface
AdminImageClient method
func (*CLI) AdminKubeClient ¶
func (c *CLI) AdminKubeClient() kubernetes.Interface
AdminKubeClient provides a Kubernetes client for the cluster admin user.
func (*CLI) AdminOAuthClient ¶
func (c *CLI) AdminOAuthClient() oauthv1client.Interface
AdminOAuthClient method
func (*CLI) AdminOauthClient ¶
func (c *CLI) AdminOauthClient() oauthv1client.Interface
AdminOauthClient method
func (*CLI) AdminOperatorClient ¶
func (c *CLI) AdminOperatorClient() operatorv1client.Interface
AdminOperatorClient method
func (*CLI) AdminProjectClient ¶
func (c *CLI) AdminProjectClient() projectv1client.Interface
AdminProjectClient method
func (*CLI) AdminQuotaClient ¶
func (c *CLI) AdminQuotaClient() quotav1client.Interface
AdminQuotaClient method
func (*CLI) AdminRouteClient ¶
func (c *CLI) AdminRouteClient() routev1client.Interface
AdminRouteClient method
func (*CLI) AdminSecurityClient ¶
func (c *CLI) AdminSecurityClient() securityv1client.Interface
AdminSecurityClient method
func (*CLI) AdminTemplateClient ¶
func (c *CLI) AdminTemplateClient() templatev1client.Interface
AdminTemplateClient method
func (*CLI) AdminUserClient ¶
func (c *CLI) AdminUserClient() userv1client.Interface
AdminUserClient method
func (CLI) AsGuestKubeconf ¶
AsGuestKubeconf instructs the command should take kubeconfig of guest cluster
func (*CLI) AuthorizationClient ¶
func (c *CLI) AuthorizationClient() authorizationv1client.Interface
AuthorizationClient method
func (*CLI) Background ¶
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) ChangeUser ¶
ChangeUser changes the user used by the current CLI session.
func (*CLI) CreateNamespace ¶
func (c *CLI) CreateNamespace(ctx context.Context, labels map[string]string) (*corev1.Namespace, error)
CreateNamespace creates and returns a test namespace, automatically torn down after the test.
func (*CLI) CreateSpecifiedNamespaceAsAdmin ¶
CreateSpecifiedNamespaceAsAdmin creates specified name namespace.
func (*CLI) DeleteSpecifiedNamespaceAsAdmin ¶
DeleteSpecifiedNamespaceAsAdmin deletes specified name namespace.
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) GetClientConfigForUser ¶
GetClientConfigForUser method
func (*CLI) GetGuestKubeconf ¶
GetGuestKubeconf gets the guest cluster kubeconf file
func (*CLI) GetKubeconf ¶
func (*CLI) GuestKubeClient ¶
func (c *CLI) GuestKubeClient() kubernetes.Interface
GuestKubeClient provides a Kubernetes client for the guest cluster user.
func (*CLI) InputString ¶
InputString adds expected input to the command
func (*CLI) KubeClient ¶
func (c *CLI) KubeClient() kubernetes.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) MustCreateNamespace ¶
MustCreateNamespace creates a test namespace and fails the test if creation fails.
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) NotShowInfo ¶
NotShowInfo instructs the command will not be logged
func (*CLI) OutputToFile ¶
OutputToFile executes the command and store output to a file
func (*CLI) Outputs ¶
Outputs executes the command and returns the stdout/stderr output as separate strings
func (*CLI) OutputsToFiles ¶
OutputsToFiles executes the command and store the stdout in one file and stderr in another one The stdout output will be written to fileName+'.stdout' The stderr output will be written to fileName+'.stderr'
func (*CLI) ProjectClient ¶
func (c *CLI) ProjectClient() projectv1client.Interface
ProjectClient method
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) SetAdminKubeconf ¶
SetAdminKubeconf instructs the admin cluster kubeconf file is set
func (*CLI) SetGuestKubeconf ¶
SetGuestKubeconf instructs the guest cluster kubeconf file is set
func (*CLI) SetKubeconf ¶
SetKubeconf instructs the cluster kubeconf file is set
func (*CLI) SetNamespace ¶
SetNamespace sets a new namespace
func (*CLI) SetShowInfo ¶
SetShowInfo instructs the command will not be logged
func (*CLI) SetupProject ¶
func (c *CLI) SetupProject()
SetupProject initializes and transitions to a new project. All resources created henceforth will reside within this project. For clusters that are not using external OIDC, it also generates and switches to a random temporary user.
func (*CLI) SilentOutput ¶
SilentOutput executes the command and returns stdout/stderr combined into one string
func (*CLI) TeardownProject ¶
func (c *CLI) TeardownProject()
TeardownProject removes projects created by this test.
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() templatev1client.Interface
TemplateClient method
func (*CLI) User ¶
User returns the name of currently logged user. If there is no user assigned for the current session, it returns 'admin'.
func (CLI) WithKubectl ¶
WithKubectl instructs the command should be invoked with binary kubectl, not oc.
func (CLI) WithoutKubeconf ¶
WithoutKubeconf instructs the command should be invoked without adding --kubeconfig parameter
func (CLI) WithoutNamespace ¶
WithoutNamespace instructs the command should be invoked without adding --namespace parameter
type Pod ¶
Pod Parameters can be used to set the template parameters except PodName as PodName can be provided using pod.Name
type SecureMatcher ¶
type SecureMatcher struct {
// contains filtered or unexported fields
}
SecureMatcher it will not print the compared values when the matcher fails
func (*SecureMatcher) FailureMessage ¶
func (matcher *SecureMatcher) FailureMessage(actual interface{}) (message string)
FailureMessage returns the message in case of successful match
func (*SecureMatcher) Match ¶
func (matcher *SecureMatcher) Match(actual interface{}) (success bool, err error)
Match checks it the condition with the given type has the right value in the given field.
func (*SecureMatcher) NegatedFailureMessage ¶
func (matcher *SecureMatcher) NegatedFailureMessage(actual interface{}) (message string)
NegatedFailureMessage returns the message in case of failed match