MCPcopy Create free account
hub / github.com/CrunchyData/postgres-operator / EnvTest

Function EnvTest

internal/testing/require/kubernetes.go:42–53  ·  view source on GitHub ↗

EnvTest returns an unstarted Environment with crds. It calls t.Skip when the "KUBEBUILDER_ASSETS" and "USE_EXISTING_CLUSTER" environment variables are unset.

(t TestingT, crds envtest.CRDInstallOptions)

Source from the content-addressed store, hash-verified

40// the "KUBEBUILDER_ASSETS" and "USE_EXISTING_CLUSTER" environment variables
41// are unset.
42func EnvTest(t TestingT, crds envtest.CRDInstallOptions) *envtest.Environment {
43 t.Helper()
44
45 if !envtestVarsSet {
46 t.SkipNow()
47 }
48
49 return &envtest.Environment{
50 CRDInstallOptions: crds,
51 Scheme: crds.Scheme,
52 }
53}
54
55var kubernetes struct {
56 sync.Mutex

Callers 1

kubernetes3Function · 0.85

Calls 2

HelperMethod · 0.80
SkipNowMethod · 0.80

Tested by

no test coverage detected