Documentation ¶
Index ¶
- Constants
- Variables
- func CasesDescribe(text string, body func()) bool
- func Failf(format string, args ...interface{})
- func RemoveCleanupAction(p CleanupActionHandle)
- func RunCleanupActions()
- func Skipf(format string, args ...interface{})
- type CleanupActionHandle
- type Framework
- func (f *Framework) AfterEach()
- func (f *Framework) BeforeEach()
- func (f *Framework) CreateCAClusterIssuer(baseName string) (cmmeta.ObjectReference, error)
- func (f *Framework) CreateCAIssuer(namespace, baseName string) (cmmeta.ObjectReference, error)
- func (f *Framework) CreateKubeNamespace(baseName string) (*corev1.Namespace, error)
- func (f *Framework) DeleteKubeNamespace(ctx context.Context, namespace string) error
- func (f *Framework) Helper() *helper.Helper
- func (f *Framework) RandomPod() *corev1.Pod
- func (f *Framework) WaitForKubeNamespaceNotExist(ctx context.Context, namespace string) error
Constants ¶
const ( // How often to poll for conditions Poll = 2 * time.Second )
Variables ¶
var DefaultConfig = &config.Config{}
DefaultConfig contains the default shared config the is likely parsed from command line arguments.
Functions ¶
func CasesDescribe ¶
func RemoveCleanupAction ¶
func RemoveCleanupAction(p CleanupActionHandle)
RemoveCleanupAction removes a function that was installed by AddCleanupAction.
func RunCleanupActions ¶
func RunCleanupActions()
RunCleanupActions runs all functions installed by AddCleanupAction. It does not remove them (see RemoveCleanupAction) but it does run unlocked, so they may remove themselves.
Types ¶
type CleanupActionHandle ¶
type CleanupActionHandle *int
func AddCleanupAction ¶
func AddCleanupAction(fn func()) CleanupActionHandle
AddCleanupAction 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().
type Framework ¶
type Framework struct { BaseName string Config *config.Config // Kubernetes API clientsets KubeClientSet kubernetes.Interface CertManagerClientSet crclientset.Interface // Namespace in which all test resources should reside Namespace *corev1.Namespace // The CA Issuer and ClusterIssuer to reference Issuer, ClusterIssuer cmmeta.ObjectReference // contains filtered or unexported fields }
Framework supports common operations used by e2e tests; it will keep a client & a namespace for you.
func NewDefaultFramework ¶
func (*Framework) AfterEach ¶
func (f *Framework) AfterEach()
AfterEach deletes the namespace, after reading its events.
func (*Framework) BeforeEach ¶
func (f *Framework) BeforeEach()
func (*Framework) CreateCAClusterIssuer ¶
func (f *Framework) CreateCAClusterIssuer(baseName string) (cmmeta.ObjectReference, error)
CreateCAClusterIssuer creates a CA cluster issuer used for creating certificates
func (*Framework) CreateCAIssuer ¶
func (f *Framework) CreateCAIssuer(namespace, baseName string) (cmmeta.ObjectReference, error)
CreateCAIssuer creates a CA issuer used for creating certificates
func (*Framework) CreateKubeNamespace ¶
CreateKubeNamespace creates a new Kubernetes Namespace for a test.
func (*Framework) DeleteKubeNamespace ¶
DeleteKubeNamespace will delete a namespace resource