Documentation ¶
Overview ¶
Package envtest provides libraries for integration testing by starting a local control plane
Index ¶
- Constants
- func CreateCRDs(config *rest.Config, crds []*apiextensionsv1beta1.CustomResourceDefinition) error
- func InstallCRDs(config *rest.Config, options CRDInstallOptions) ([]*apiextensionsv1beta1.CustomResourceDefinition, error)
- func WaitForCRDs(config *rest.Config, crds []*apiextensionsv1beta1.CustomResourceDefinition, ...) error
- type CRDInstallOptions
- type Environment
- type NewlineReporter
- func (NewlineReporter) AfterSuiteDidRun(setupSummary *types.SetupSummary)
- func (NewlineReporter) BeforeSuiteDidRun(setupSummary *types.SetupSummary)
- func (NewlineReporter) SpecDidComplete(specSummary *types.SpecSummary)
- func (NewlineReporter) SpecSuiteDidEnd(summary *types.SuiteSummary)
- func (NewlineReporter) SpecSuiteWillBegin(config config.GinkgoConfigType, summary *types.SuiteSummary)
- func (NewlineReporter) SpecWillRun(specSummary *types.SpecSummary)
Constants ¶
const ( StartTimeout = 60 StopTimeout = 60 )
Default binary path for test framework
Variables ¶
This section is empty.
Functions ¶
func CreateCRDs ¶
func CreateCRDs(config *rest.Config, crds []*apiextensionsv1beta1.CustomResourceDefinition) error
CreateCRDs creates the CRDs
func InstallCRDs ¶
func InstallCRDs(config *rest.Config, options CRDInstallOptions) ([]*apiextensionsv1beta1.CustomResourceDefinition, error)
InstallCRDs installs a collection of CRDs into a cluster by reading the crd yaml files from a directory
func WaitForCRDs ¶
func WaitForCRDs(config *rest.Config, crds []*apiextensionsv1beta1.CustomResourceDefinition, options CRDInstallOptions) error
WaitForCRDs waits for the CRDs to appear in discovery
Types ¶
type CRDInstallOptions ¶
type CRDInstallOptions struct { // Paths is the path to the directory containing CRDs Paths []string // CRDs is a list of CRDs to install CRDs []*apiextensionsv1beta1.CustomResourceDefinition // ErrorIfPathMissing will cause an error if a Path does not exist ErrorIfPathMissing bool // contains filtered or unexported fields }
CRDInstallOptions are the options for installing CRDs
type Environment ¶
type Environment struct { // ControlPlane is the ControlPlane including the apiserver and etcd ControlPlane integration.ControlPlane // Config can be used to talk to the apiserver Config *rest.Config // CRDs is a list of CRDs to install CRDs []*apiextensionsv1beta1.CustomResourceDefinition // CRDDirectoryPaths is a list of paths containing CRD yaml or json configs. CRDDirectoryPaths []string }
Environment creates a Kubernetes test environment that will start / stop the Kubernetes control plane and install extension APIs
type NewlineReporter ¶
type NewlineReporter struct{}
NewlineReporter is Reporter that Prints a newline after the default Reporter output so that the results are correctly parsed by test automation. See issue https://github.com/jstemmer/go-junit-report/issues/31
func (NewlineReporter) AfterSuiteDidRun ¶
func (NewlineReporter) AfterSuiteDidRun(setupSummary *types.SetupSummary)
AfterSuiteDidRun implements ginkgo.Reporter
func (NewlineReporter) BeforeSuiteDidRun ¶
func (NewlineReporter) BeforeSuiteDidRun(setupSummary *types.SetupSummary)
BeforeSuiteDidRun implements ginkgo.Reporter
func (NewlineReporter) SpecDidComplete ¶
func (NewlineReporter) SpecDidComplete(specSummary *types.SpecSummary)
SpecDidComplete implements ginkgo.Reporter
func (NewlineReporter) SpecSuiteDidEnd ¶
func (NewlineReporter) SpecSuiteDidEnd(summary *types.SuiteSummary)
SpecSuiteDidEnd Prints a newline between "35 Passed | 0 Failed | 0 Pending | 0 Skipped" and "--- PASS:"
func (NewlineReporter) SpecSuiteWillBegin ¶
func (NewlineReporter) SpecSuiteWillBegin(config config.GinkgoConfigType, summary *types.SuiteSummary)
SpecSuiteWillBegin implements ginkgo.Reporter
func (NewlineReporter) SpecWillRun ¶
func (NewlineReporter) SpecWillRun(specSummary *types.SpecSummary)
SpecWillRun implements ginkgo.Reporter