Documentation ¶
Index ¶
- Constants
- Variables
- func ConditionStatusEqual(obj runtime.Object, ConditionType, ConditionStatus interface{}) error
- func DeleteAndWaitUntilNotFound(ctx context.Context, c *RecordingClient, obj runtime.Object, ...) error
- func DexFakeClientCredentialsGrant(ctx context.Context, log logr.Logger, client *http.Client, ...) (token string, err error)
- func E2EOperatorCheck(ctx context.Context, t *testing.T, serviceClient *RecordingClient, ...)
- func KubeCarrierCheck(ctx context.Context, t *testing.T, managementClient *RecordingClient, ...)
- func KubeCarrierOperatorCheck(ctx context.Context, t *testing.T, managementClient *RecordingClient, ...)
- func LoadTestDataFile(t *testing.T, fname string) string
- func LoadTestDataObject(t *testing.T, fname string, obj runtime.Object)
- func LogObject(t *testing.T, obj interface{})
- func NewCatalog(name, namespace string, ...) *catalogv1alpha1.Catalog
- func NewCatalogEntry(name, namespace, crdName string) *catalogv1alpha1.CatalogEntry
- func NewFakeCouchDBCRD(group string) *apiextensionsv1.CustomResourceDefinition
- func NewFakeDB(name, namespace string) *fakev1alpha1.DB
- func NewProviderAccount(name string, subjects ...rbacv1.Subject) *catalogv1alpha1.Account
- func NewServiceCluster(name, namespace, secret string) *corev1alpha1.ServiceCluster
- func NewTenantAccount(name string, subjects ...rbacv1.Subject) *catalogv1alpha1.Account
- func WaitUntilCondition(ctx context.Context, c *RecordingClient, obj runtime.Object, ...) error
- func WaitUntilFound(ctx context.Context, c *RecordingClient, obj runtime.Object, ...) error
- func WaitUntilNotFound(ctx context.Context, c *RecordingClient, obj runtime.Object, ...) error
- func WaitUntilReady(ctx context.Context, c *RecordingClient, obj runtime.Object, ...) error
- type CleanUpStrategy
- type Framework
- func (f *Framework) Config() FrameworkConfig
- func (f *Framework) ManagementClient(t *testing.T, options ...func(config *restclient.Config) error) (*RecordingClient, error)
- func (f *Framework) ServiceClient(t *testing.T, options ...func(config *restclient.Config) error) (*RecordingClient, error)
- func (f *Framework) SetupServiceCluster(ctx context.Context, cl *RecordingClient, t *testing.T, name string, ...) *corev1alpha1.ServiceCluster
- type FrameworkConfig
- type Logger
- func (l *Logger) Enabled() bool
- func (l *Logger) Error(err error, msg string, kvs ...interface{})
- func (l *Logger) Info(msg string, kvs ...interface{})
- func (l *Logger) V(level int) logr.InfoLogger
- func (l *Logger) WithName(name string) logr.Logger
- func (l *Logger) WithValues(kvs ...interface{}) logr.Logger
- type RecordingClient
- func (rc *RecordingClient) CleanUpFunc(ctx context.Context) func()
- func (rc *RecordingClient) Create(ctx context.Context, obj runtime.Object, opts ...client.CreateOption) error
- func (rc *RecordingClient) Delete(ctx context.Context, obj runtime.Object, opts ...client.DeleteOption) error
- func (rc *RecordingClient) EnsureCreated(ctx context.Context, obj runtime.Object, opts ...client.CreateOption) error
- func (rc *RecordingClient) RegisterForCleanup(obj runtime.Object)
- func (rc *RecordingClient) UnregisterForCleanup(obj runtime.Object)
- type TestingLogWriter
Constants ¶
View Source
const (
// OverrideGoldenEnv is the environment variable signalling the golden files should be overwritten
OverrideGoldenEnv = "FIX_GOLDEN"
)
Variables ¶
View Source
var (
WithTimeout = util.WithClientWatcherTimeout
)
Functions ¶
func ConditionStatusEqual ¶
func DeleteAndWaitUntilNotFound ¶
func DeleteAndWaitUntilNotFound(ctx context.Context, c *RecordingClient, obj runtime.Object, options ...util.ClientWatcherOption) error
func DexFakeClientCredentialsGrant ¶ added in v0.2.0
func E2EOperatorCheck ¶ added in v0.2.0
func KubeCarrierCheck ¶ added in v0.2.0
func KubeCarrierOperatorCheck ¶ added in v0.2.0
func LoadTestDataFile ¶ added in v0.2.0
LoadTestDataFile copies from testdata VFS to the temp file system, returning the file name
func LoadTestDataObject ¶ added in v0.2.0
func NewCatalog ¶ added in v0.2.0
func NewCatalog(name, namespace string, catalogEntrySelector, tenantSelector *metav1.LabelSelector) *catalogv1alpha1.Catalog
func NewCatalogEntry ¶ added in v0.2.0
func NewCatalogEntry(name, namespace, crdName string) *catalogv1alpha1.CatalogEntry
func NewFakeCouchDBCRD ¶ added in v0.2.0
func NewFakeCouchDBCRD(group string) *apiextensionsv1.CustomResourceDefinition
func NewFakeDB ¶ added in v0.2.0
func NewFakeDB(name, namespace string) *fakev1alpha1.DB
func NewProviderAccount ¶ added in v0.2.0
func NewProviderAccount(name string, subjects ...rbacv1.Subject) *catalogv1alpha1.Account
func NewServiceCluster ¶ added in v0.2.0
func NewServiceCluster(name, namespace, secret string) *corev1alpha1.ServiceCluster
func NewTenantAccount ¶ added in v0.2.0
func NewTenantAccount(name string, subjects ...rbacv1.Subject) *catalogv1alpha1.Account
func WaitUntilCondition ¶
func WaitUntilCondition(ctx context.Context, c *RecordingClient, obj runtime.Object, ConditionType, conditionStatus interface{}, options ...util.ClientWatcherOption) error
func WaitUntilFound ¶
func WaitUntilFound(ctx context.Context, c *RecordingClient, obj runtime.Object, options ...util.ClientWatcherOption) error
func WaitUntilNotFound ¶
func WaitUntilNotFound(ctx context.Context, c *RecordingClient, obj runtime.Object, options ...util.ClientWatcherOption) error
func WaitUntilReady ¶
func WaitUntilReady(ctx context.Context, c *RecordingClient, obj runtime.Object, options ...util.ClientWatcherOption) error
Types ¶
type CleanUpStrategy ¶ added in v0.2.0
type CleanUpStrategy string
const ( CleanupAlways CleanUpStrategy = "always" CleanupOnSuccess CleanUpStrategy = "on-success" CleanupNever CleanUpStrategy = "never" )
type Framework ¶ added in v0.2.0
type Framework struct { ManagementScheme *runtime.Scheme ServiceScheme *runtime.Scheme // contains filtered or unexported fields }
func New ¶ added in v0.2.0
func New(c FrameworkConfig) (f *Framework, err error)
func (*Framework) Config ¶ added in v0.2.0
func (f *Framework) Config() FrameworkConfig
func (*Framework) ManagementClient ¶ added in v0.2.0
func (f *Framework) ManagementClient(t *testing.T, options ...func(config *restclient.Config) error) (*RecordingClient, error)
func (*Framework) ServiceClient ¶ added in v0.2.0
func (f *Framework) ServiceClient(t *testing.T, options ...func(config *restclient.Config) error) (*RecordingClient, error)
func (*Framework) SetupServiceCluster ¶ added in v0.2.0
func (f *Framework) SetupServiceCluster(ctx context.Context, cl *RecordingClient, t *testing.T, name string, account *catalogv1alpha1.Account) *corev1alpha1.ServiceCluster
type FrameworkConfig ¶ added in v0.2.0
type FrameworkConfig struct { TestID string ManagementExternalKubeconfigPath string ManagementInternalKubeconfigPath string ServiceExternalKubeconfigPath string ServiceInternalKubeconfigPath string CleanUpStrategy CleanUpStrategy }
func (*FrameworkConfig) Default ¶ added in v0.2.0
func (c *FrameworkConfig) Default()
func (*FrameworkConfig) ManagementClusterName ¶ added in v0.2.0
func (c *FrameworkConfig) ManagementClusterName() string
func (*FrameworkConfig) ServiceClusterName ¶ added in v0.2.0
func (c *FrameworkConfig) ServiceClusterName() string
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger implements logr.Logger and logs to testing.T to preserve the order of log lines in tests.
func (*Logger) WithValues ¶
WithValues implements logr.Logger.WithValues
type RecordingClient ¶ added in v0.2.0
type RecordingClient struct { *util.ClientWatcher // contains filtered or unexported fields }
func (*RecordingClient) CleanUpFunc ¶ added in v0.2.0
func (rc *RecordingClient) CleanUpFunc(ctx context.Context) func()
func (*RecordingClient) Create ¶ added in v0.2.0
func (rc *RecordingClient) Create(ctx context.Context, obj runtime.Object, opts ...client.CreateOption) error
func (*RecordingClient) Delete ¶ added in v0.2.0
func (rc *RecordingClient) Delete(ctx context.Context, obj runtime.Object, opts ...client.DeleteOption) error
func (*RecordingClient) EnsureCreated ¶ added in v0.2.0
func (rc *RecordingClient) EnsureCreated(ctx context.Context, obj runtime.Object, opts ...client.CreateOption) error
func (*RecordingClient) RegisterForCleanup ¶ added in v0.2.0
func (rc *RecordingClient) RegisterForCleanup(obj runtime.Object)
func (*RecordingClient) UnregisterForCleanup ¶ added in v0.2.0
func (rc *RecordingClient) UnregisterForCleanup(obj runtime.Object)
type TestingLogWriter ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.