Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReplaceInFile ¶
ReplaceInFile replaces all instances of old with new in the file at path. todo(camilamacedo86): this func can be pushed to upstream/kb
func ReplaceRegexInFile ¶
ReplaceRegexInFile finds all strings that match `match` and replaces them with `replace` in the file at path. todo(camilamacedo86): this func can be pushed to upstream/kb
func UncommentCode ¶
UncommentCode searches for target in the file and remove the comment prefix of the target content. The target content may span multiple lines. todo(camilamacedo86): this func exists in upstream/kb but there the error is not thrown. We need to push this change. See: https://github.com/kubernetes-sigs/kubebuilder/blob/master/test/e2e/utils/util.go
Types ¶
type TestContext ¶
type TestContext struct { *kbtestutils.TestContext // BundleImageName store the image to use to build the bundle BundleImageName string // ProjectName store the project name ProjectName string // contains filtered or unexported fields }
TestContext wraps kubebuilder's e2e TestContext. Note: Though the testcontext has options to enable OLM and prometheus while starting test suite, we currently aren't using it for hybrid helm plugin.
func NewPartialTestContext ¶
func NewPartialTestContext(binaryName, dir string, env ...string) (TestContext, error)
NewPartialTestContext returns a TestContext containing a partial kubebuilder TestContext. This object needs to be populated with GVK information. The underlying TestContext is created directly rather than through a constructor so cluster-based setup is skipped.
func NewTestContext ¶
func NewTestContext(binaryName string, env ...string) (TestContext, error)
NewTestContext returns a TestContext containing a new kubebuilder TestContext. Construct if your environment is connected to a live cluster, ex. for e2e tests.