testutil

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2020 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func E2EOperatorCheck

func E2EOperatorCheck(
	ctx context.Context,
	t *testing.T,
	serviceClient *testutil.RecordingClient,
	serviceScheme *runtime.Scheme,
)

func KubeCarrierCheck

func KubeCarrierCheck(
	ctx context.Context,
	t *testing.T,
	managementClient *testutil.RecordingClient,
	managementScheme *runtime.Scheme,
)

func KubeCarrierOperatorCheck

func KubeCarrierOperatorCheck(
	ctx context.Context,
	t *testing.T,
	managementClient *testutil.RecordingClient,
	managementScheme *runtime.Scheme,
)

func LoadTestDataFile

func LoadTestDataFile(t *testing.T, fname string) string

LoadTestDataFile copies from testdata VFS to the temp file system, returning the file name

func LoadTestDataObject

func LoadTestDataObject(t *testing.T, fname string, obj runtime.Object)

func NewCatalog

func NewCatalog(name, namespace string, catalogEntrySelector, tenantSelector *metav1.LabelSelector) *catalogv1alpha1.Catalog

func NewCatalogEntry

func NewCatalogEntry(name, namespace, crdName string) *catalogv1alpha1.CatalogEntry

func NewFakeDB

func NewFakeDB(name, namespace string) *fakev1alpha1.DB

func NewProviderAccount

func NewProviderAccount(name string, subjects ...rbacv1.Subject) *catalogv1alpha1.Account

func NewServiceCluster

func NewServiceCluster(name, namespace, secret string) *corev1alpha1.ServiceCluster

func NewTenantAccount

func NewTenantAccount(name string, subjects ...rbacv1.Subject) *catalogv1alpha1.Account

Types

type Framework

type Framework struct {
	ManagementScheme *runtime.Scheme

	ServiceScheme *runtime.Scheme
	// contains filtered or unexported fields
}

func New

func New(c FrameworkConfig) (f *Framework, err error)

func (*Framework) Config

func (f *Framework) Config() FrameworkConfig

func (*Framework) ManagementClient

func (f *Framework) ManagementClient(t *testing.T, options ...func(config *restclient.Config) error) (*testutil.RecordingClient, error)

func (*Framework) ServiceClient

func (f *Framework) ServiceClient(t *testing.T, options ...func(config *restclient.Config) error) (*testutil.RecordingClient, error)

func (*Framework) SetupServiceCluster

func (f *Framework) SetupServiceCluster(ctx context.Context, cl *testutil.RecordingClient, t *testing.T, name string, account *catalogv1alpha1.Account) *corev1alpha1.ServiceCluster

type FrameworkConfig

type FrameworkConfig struct {
	TestID string

	ManagementExternalKubeconfigPath string
	ManagementInternalKubeconfigPath string
	ServiceExternalKubeconfigPath    string
	ServiceInternalKubeconfigPath    string
	CleanUpStrategy                  testutil.CleanUpStrategy
}

func (*FrameworkConfig) Default

func (c *FrameworkConfig) Default()

func (*FrameworkConfig) ManagementClusterName

func (c *FrameworkConfig) ManagementClusterName() string

func (*FrameworkConfig) ServiceClusterName

func (c *FrameworkConfig) ServiceClusterName() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL