Documentation ¶
Index ¶
- func RunAll(ctx context.Context, t *testing.T, mgr manager.Manager, ...)
- func RunAllWithDependenciesCreatedButNotObject(ctx context.Context, t *testing.T, mgr manager.Manager, ...)
- func RunAllWithObjectCreated(ctx context.Context, t *testing.T, mgr manager.Manager, ...)
- func RunSpecific(ctx context.Context, t *testing.T, fixture []resourcefixture.ResourceFixture, ...)
- type ShouldRunFunc
- type SystemContext
- type TestCaseFunc
- type TestContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunAll ¶
func RunAll(ctx context.Context, t *testing.T, mgr manager.Manager, shouldRunFunc ShouldRunFunc, testCaseFunc TestCaseFunc)
func RunAllWithDependenciesCreatedButNotObject ¶
func RunAllWithDependenciesCreatedButNotObject(ctx context.Context, t *testing.T, mgr manager.Manager, shouldRunFunc ShouldRunFunc, testCaseFunc TestCaseFunc)
func RunAllWithObjectCreated ¶
func RunAllWithObjectCreated(ctx context.Context, t *testing.T, mgr manager.Manager, shouldRunFunc ShouldRunFunc, testCaseFunc TestCaseFunc)
func RunSpecific ¶
func RunSpecific(ctx context.Context, t *testing.T, fixture []resourcefixture.ResourceFixture, testCaseFunc func(ctx context.Context, t *testing.T, testContext TestContext))
Types ¶
type ShouldRunFunc ¶
type ShouldRunFunc func(fixture resourcefixture.ResourceFixture, mgr manager.Manager) bool
type SystemContext ¶
type SystemContext struct { Manager manager.Manager SMLoader *servicemappingloader.ServiceMappingLoader Reconciler *testreconciler.TestReconciler TFProvider *schema.Provider DCLConfig *mmdcl.Config DCLConverter *dclconversion.Converter }
type TestCaseFunc ¶
type TestCaseFunc func(ctx context.Context, t *testing.T, testContext TestContext, sysContext SystemContext)
type TestContext ¶
type TestContext struct { CreateUnstruct *unstructured.Unstructured UpdateUnstruct *unstructured.Unstructured DependencyUnstructs []*unstructured.Unstructured ResourceFixture resourcefixture.ResourceFixture NamespacedName types.NamespacedName UniqueId string }
func NewTestContext ¶
func NewTestContext(t *testing.T, fixture resourcefixture.ResourceFixture, project testgcp.GCPProject) TestContext
NewTestContext takes a resource fixture and returns a filled out TestContext The resources in the fixture are converted to unstructured.Unstructured and their namespaces are set equal to a unique generated id.
Click to show internal directories.
Click to hide internal directories.