...

Package create

import "github.com/GoogleCloudPlatform/k8s-config-connector/config/tests/samples/create"
Overview
Index

Overview ▾

func MaybeSkip

func MaybeSkip(t *testing.T, name string, resources []*unstructured.Unstructured)

func RunCreateDeleteTest

func RunCreateDeleteTest(t *Harness, unstructs []*unstructured.Unstructured, cleanupResources bool)

func SetupNamespacesAndApplyDefaults

func SetupNamespacesAndApplyDefaults(t *Harness, samples []Sample, project testgcp.GCPProject)

type Harness

type Harness struct {
    *testing.T
    Ctx context.Context
    // contains filtered or unexported fields
}

func NewHarness

func NewHarness(t *testing.T, ctx context.Context) *Harness

func NewHarnessWithManager

func NewHarnessWithManager(t *testing.T, ctx context.Context, mgr manager.Manager) *Harness

NewHarnessWithManager builds a Harness for an existing manager. deprecated: Prefer NewHarness, which can construct a manager and mock gcp etc.

func (*Harness) GetClient

func (h *Harness) GetClient() client.Client

type Sample

type Sample struct {
    Name      string
    Resources []*unstructured.Unstructured
}

func LoadSamples

func LoadSamples(t *testing.T, project testgcp.GCPProject) []Sample

LoadSamples loads all the samples