NewTestContext returns a TestContext containing a new kubebuilder TestContext. Construct if your environment is connected to a live cluster, ex. for e2e tests.
(binaryName string, env ...string)
| 47 | // NewTestContext returns a TestContext containing a new kubebuilder TestContext. |
| 48 | // Construct if your environment is connected to a live cluster, ex. for e2e tests. |
| 49 | func NewTestContext(binaryName string, env ...string) (tc TestContext, err error) { |
| 50 | if tc.TestContext, err = kbtestutils.NewTestContext(binaryName, env...); err != nil { |
| 51 | return tc, err |
| 52 | } |
| 53 | tc.ProjectName = strings.ToLower(filepath.Base(tc.Dir)) |
| 54 | tc.ImageName = makeImageName(tc.ProjectName) |
| 55 | tc.BundleImageName = makeBundleImageName(tc.ProjectName) |
| 56 | tc.isOLMManagedBySuite = true |
| 57 | tc.isPrometheusManagedBySuite = true |
| 58 | return tc, nil |
| 59 | } |
| 60 | |
| 61 | // NewPartialTestContext returns a TestContext containing a partial kubebuilder TestContext. |
| 62 | // This object needs to be populated with GVK information. The underlying TestContext is |
no test coverage detected