Skip to content
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/integration: rewrite in BDD style, fixup cleanup command #4303

Merged
merged 2 commits into from Dec 11, 2020

Conversation

estroz
Copy link
Member

@estroz estroz commented Dec 11, 2020

Description of the change:

  • Makefile: call integration tests directly
  • internal/generate/clusterserviceversion: use FromVersion correctly
  • internal/olm/operator/uninstall.go: rewrite Run() so it cleans all possible resources up and reports whether a package ever existed correctly
  • internal/testutils,docs: fix 'packagemanifests' target
  • tests/integration: rewrite with Ginkgo/Gomega and use Go sample

Motivation for the change: This PR rewrites OLM integration tests in BDD style and using the Go memcached-operator sample, as well as fixes a few bugs (that aren't in a release AFAIK so no changelog needed). Additionally, the OLM component of Go e2e tests was removed because a more thorough test is already performed by the integration tests.

/area testing

Checklist

If the pull request includes user-facing changes, extra documentation is required:

@openshift-ci-robot openshift-ci-robot added the area/testing Issue related to testing the operator-sdk and subcomponents label Dec 11, 2020
the Go memcached-operator sample, as well as fixes a few bugs.

Makefile: call integration tests directly

internal/generate/clusterserviceversion: use FromVersion correctly

internal/olm/operator/uninstall.go: rewrite Run() so it cleans
all possible resources up and reports whether a package ever existed
correctly

internal/testutils,docs: fix 'packagemanifests' target

tests/integration: rewrite with Ginkgo/Gomega and use Go sample
@estroz
Copy link
Member Author

estroz commented Dec 11, 2020

/cc @varshaprasad96

@@ -38,7 +38,7 @@ endif
ifeq ($(IS_CHANNEL_DEFAULT), 1)
PKG_IS_DEFAULT_CHANNEL := --default-channel
endif
PKG_MAN_OPTS ?= $(FROM_VERSION) $(PKG_CHANNELS) $(PKG_IS_DEFAULT_CHANNEL)
PKG_MAN_OPTS ?= $(PKG_FROM_VERSION) $(PKG_CHANNELS) $(PKG_IS_DEFAULT_CHANNEL)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shows required an entry + migration step for who is using this pkg manifests scaffold on the projects.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They aren't scaffolded at all, the user has to add this themselves, so I don't think this is necessary. However it doesn't hurt to add one.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are not scaffolded. However, the user might have followed the docs and added these steps.
Then, we should provide the guidance to migrate it in the changelog.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@estroz just a few nits regards the changelogs.
And then, we need to fix the CI jobs for netfly that are broken. Also, see my question

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 11, 2020
@estroz
Copy link
Member Author

estroz commented Dec 11, 2020

we need to fix the CI jobs for netfly that are broken

Not sure what's up with that. Its unrelated to this PR though. ping @asmacdo do we need to update website deps?

Copy link
Member

@varshaprasad96 varshaprasad96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. Modifications in cleanup/uninstall is helpful. Will make similar changes in kubectl-operator plugin uninstall.

@estroz estroz merged commit 47f7167 into operator-framework:master Dec 11, 2020
@estroz estroz deleted the chore/fix-integration-tests branch December 11, 2020 18:57
reinvantveer pushed a commit to reinvantveer/operator-sdk that referenced this pull request Feb 5, 2021
…ator-framework#4303)

Signed-off-by: reinvantveer <rein.van.t.veer@geodan.nl>
rearl-scwx pushed a commit to rearl-scwx/operator-sdk that referenced this pull request Feb 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing Issue related to testing the operator-sdk and subcomponents do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants