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

Add e2e testing with uptest #30

Merged
merged 8 commits into from
Oct 14, 2022
Merged

Conversation

turkenh
Copy link
Member

@turkenh turkenh commented Oct 7, 2022

Description of your changes

End to end testing with uptest.

I have:

  • Read and followed Upbound's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR, as appropriate.

How has this code been tested

export UPTEST_GCP_CREDS=$(cat ~/Desktop/my-gcp-sa.json)
export UPTEST_GCP_PROJECT=<my-gcp-project>

make e2e

@turkenh turkenh mentioned this pull request Oct 7, 2022
3 tasks
Signed-off-by: Hasan Turken <turkenh@gmail.com>
Signed-off-by: Hasan Turken <turkenh@gmail.com>
@turkenh turkenh changed the title [WIP] Add e2e testing with uptest Add e2e testing with uptest Oct 11, 2022
Signed-off-by: Hasan Turken <turkenh@gmail.com>
Makefile Outdated
@$(INFO) running automated tests
@$(KUBECTL) apply -R -f package/cluster
@KUBECTL=$(KUBECTL) KUTTL=$(KUTTL) uptest --claim-or-composite --example-list=examples/cluster-claim.yaml --default-timeout=2400 || $(FAIL)
Copy link
Member Author

Choose a reason for hiding this comment

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

TODO(turkenh): This line needs to be replaced with available uptest binary.

Copy link
Member

Choose a reason for hiding this comment

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

Should we add uptest to https://github.com/upbound/build?

Copy link
Member

Choose a reason for hiding this comment

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

@turkenh where can I get the correct uptest binary version for local uptest-local testing?

Copy link
Member Author

Choose a reason for hiding this comment

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

It is now part of build submodule, you should be able to checkout the PR and run make e2e after setting up your creds with UPTEST_GCP_CREDS env var.

@turkenh turkenh marked this pull request as ready for review October 11, 2022 14:01
Makefile Outdated Show resolved Hide resolved
Signed-off-by: Hasan Turken <turkenh@gmail.com>
Signed-off-by: Hasan Turken <turkenh@gmail.com>
Signed-off-by: Hasan Turken <turkenh@gmail.com>
@turkenh
Copy link
Member Author

turkenh commented Oct 14, 2022

/test-e2e

Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated
@$(KUBECTL) -n upbound-system get cm universal-crossplane-config >/dev/null 2>&1 || $(UP) uxp install
@$(KUBECTL) -n upbound-system wait deploy crossplane --for condition=Available --timeout=120s
@$(KUBECTL) get provider.pkg upbound-provider-gcp > /dev/null 2>&1 || $(UP) ctp provider install upbound/provider-gcp:$(PROVIDER_GCP_VERSION)
Copy link

Choose a reason for hiding this comment

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

Have you considered building the configuration package locally and installing that similar to providers? It'd make it test crossplane.yaml as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, actually have a draft PR in build submodule: https://github.com/upbound/build/pull/208/files

I remember, I tried to make it work for provider packages as well and gave up after seeing things getting too complicated. But I will give it another try only with configuration package support (for now).

Copy link
Member Author

@turkenh turkenh Oct 14, 2022

Choose a reason for hiding this comment

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

Ok, looks like we are good to go now, especially with the removal of package pull secret requirement things are more straightforward.
Also to indicate only configuration package deployment is supported, I have named the target as local.xpkg.deploy-cfg.<package> which made me feel better: upbound/build#208

For the changes on this side, please see the last commit.

.github/workflows/e2e.yaml Outdated Show resolved Hide resolved
.github/workflows/e2e.yaml Outdated Show resolved Hide resolved
.github/workflows/e2e.yaml Outdated Show resolved Hide resolved
@turkenh turkenh requested a review from muvaf October 14, 2022 14:13
Signed-off-by: Hasan Turken <turkenh@gmail.com>
Copy link

@muvaf muvaf left a comment

Choose a reason for hiding this comment

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

Thanks @turkenh ! Looking great!

Makefile Show resolved Hide resolved
test/setup.sh Show resolved Hide resolved
Signed-off-by: Hasan Turken <turkenh@gmail.com>
Copy link
Member

@ytsarev ytsarev left a comment

Choose a reason for hiding this comment

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

LGTM

@turkenh turkenh merged commit fb5182d into upbound:main Oct 14, 2022
@turkenh turkenh deleted the e2e-with-uptest branch October 14, 2022 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants