-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test-e2e/samples/cleanup: centralize code to integrate the project with OLM #4144
test-e2e/samples/cleanup: centralize code to integrate the project with OLM #4144
Conversation
bd9cfc8
to
2db9fde
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
2db9fde
to
f265ec8
Compare
f265ec8
to
2843d7c
Compare
@@ -76,7 +76,9 @@ func (ma *MemcachedAnsible) Run() { | |||
ma.addingAnsibleTask() | |||
ma.addingMoleculeMockData() | |||
|
|||
pkg.RunOlmIntegration(ma.ctx) | |||
log.Infof("integrate the sample with OLM") | |||
err = ma.ctx.IntegrateProjectWithOLM() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks clean for all the three e2e tests ! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
Holding this for discussion (see #4144 (comment)) /hold |
0dc1b98
to
9f08121
Compare
56316c1
to
7524fe3
Compare
7524fe3
to
33ca1bf
Compare
e97cf66
to
96e7f65
Compare
96e7f65
to
e4987ac
Compare
@@ -76,7 +76,13 @@ func (ma *MemcachedAnsible) Run() { | |||
ma.addingAnsibleTask() | |||
ma.addingMoleculeMockData() | |||
|
|||
ma.ctx.CreateBundle() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The goal here is to centralize the implementation to allow samples and tests to use the same. Then, the StripBundleAnnotations
is only required for the samples.
|
||
err = ctx.StripBundleAnnotations() | ||
CheckError("stripping bundle annotations", err) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note that we are moving it out to the internal/testutils/olm.go
where it can be used by both.
e4987ac
to
20b9a65
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two suggestions, otherwise LGTM
if tc.IsRunningOnKind() { | ||
By("loading the bundle image into Kind cluster") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to load the bundle image since run bundle
would be able to pull it itself.
if tc.IsRunningOnKind() { | |
By("loading the bundle image into Kind cluster") | |
if tc.IsRunningOnKind() { | |
By("loading the bundle image into Kind cluster") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
…th OLM (operator-framework#4144) **Description of the change:** - Move the olm helpers in the `hack/generate/samples/internal/pkg/utils.go` to `internal/testutils/olm.go`. Reason: allow samples and tests to use the same helper and keep it in a more appropriate place. - Remove the duplicates calls made in the e2e tests which are already done in the samples in the e2e tests - Use the e2e test the helper instead of duplicate the code. **Motivation for the change:** - Maintainability - Reduce CI effort by not calling make bundle twice. - Centralize the steps to integrate the projects with OLM and keep samples and e2e tests using the same func - Reduce the duplication of code as of the calls made Signed-off-by: reinvantveer <[email protected]>
…th OLM (operator-framework#4144) **Description of the change:** - Move the olm helpers in the `hack/generate/samples/internal/pkg/utils.go` to `internal/testutils/olm.go`. Reason: allow samples and tests to use the same helper and keep it in a more appropriate place. - Remove the duplicates calls made in the e2e tests which are already done in the samples in the e2e tests - Use the e2e test the helper instead of duplicate the code. **Motivation for the change:** - Maintainability - Reduce CI effort by not calling make bundle twice. - Centralize the steps to integrate the projects with OLM and keep samples and e2e tests using the same func - Reduce the duplication of code as of the calls made Signed-off-by: rearl <[email protected]>
Description of the change:
hack/generate/samples/internal/pkg/utils.go
tointernal/testutils/olm.go
. Reason: allow samples and tests to use the same helper and keep it in a more appropriate place.Motivation for the change: