Documentation ¶
Index ¶
- func Failf(format string, args ...interface{})
- func FailfWithOffset(offset int, format string, args ...interface{})
- func Logf(format string, args ...interface{})
- func RandomSuffix() string
- func WaitForDefaultServiceAccountInNamespace(c clientset.Interface, namespace string) error
- type Framework
- type TestConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Failf ¶
func Failf(format string, args ...interface{})
Failf fails the test with the given message.
func FailfWithOffset ¶
FailfWithOffset fails the test with the given message.
The offset argument is used to modify the call-stack offset when computing line numbers. This is useful in helper functions that make assertions so that error messages refer to the calling line in the test, as opposed to the line in the helper function.
e.g. "It(...) -> f -> FailfWithOffset(1, ...)" will be logged for "It"
func RandomSuffix ¶
func RandomSuffix() string
RandomSuffix provides a random sequence that can be appended to API objects' names.
Types ¶
type Framework ¶
type Framework struct { UniqueName string // e.g. "mytest-1234" KubeClient clientset.Interface DynamicClient dynamic.Interface // contains filtered or unexported fields }
Framework wraps the context and common operations for tests.
func (*Framework) AddNamespacesToDelete ¶
AddNamespacesToDelete marks one or more namespaces for deletion when the test completes.
func (*Framework) AfterEach ¶
func (f *Framework) AfterEach()
AfterEach performs common cleanup tasks.
func (*Framework) BeforeEach ¶
func (f *Framework) BeforeEach()
BeforeEach performs common initialization tasks.
func (*Framework) ClientConfig ¶
ClientConfig returns a copy of the Framework's rest.Config. Can be used to generate new API clients.
type TestConfig ¶
type TestConfig struct { // Path to a Kubeconfig file containing credentials to interact with Kubernetes. Kubeconfig string }
TestConfig contains the configuration of a test context.
var Config TestConfig
Config holds the global configuration of the current test context.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package apps contains helpers to interact with various Kubernetes workloads.
|
Package apps contains helpers to interact with various Kubernetes workloads. |
Package aws contains helpers to interact with AWS services.
|
Package aws contains helpers to interact with AWS services. |
eventbridge
Package eventbridge contains helpers for AWS EventBridge.
|
Package eventbridge contains helpers for AWS EventBridge. |
iam
Package iam contains helpers to interact with IAM objects.
|
Package iam contains helpers to interact with IAM objects. |
sqs
Package sqs contains helpers for AWS SQS.
|
Package sqs contains helpers for AWS SQS. |
Package bridges contains helpers to interact with Bridge objects.
|
Package bridges contains helpers to interact with Bridge objects. |
Package cloudevents contains helpers to interact with CloudEvents.
|
Package cloudevents contains helpers to interact with CloudEvents. |
Package ducktypes contains helpers to interact with Knative duck-typed objects.
|
Package ducktypes contains helpers to interact with Knative duck-typed objects. |
Package manifest contains helpers to consume objects from Kubernetes manifests.
|
Package manifest contains helpers to consume objects from Kubernetes manifests. |