Skip to content
This repository has been archived by the owner on Aug 9, 2022. It is now read-only.

Drop integration tests, add e2e tests with kind #7

Merged
merged 2 commits into from
Mar 29, 2022
Merged

Drop integration tests, add e2e tests with kind #7

merged 2 commits into from
Mar 29, 2022

Conversation

mudler
Copy link
Contributor

@mudler mudler commented Mar 28, 2022

Fixes: #2
Fixes: #6

Need also to cleanup a bit

Signed-off-by: Ettore Di Giacinto edigiacinto@suse.com

@mudler mudler requested a review from Itxaka March 28, 2022 16:24
Makefile Outdated
e2e-tests:
kind delete cluster --name "ros-e2e"
kind create cluster --name "ros-e2e"
kubectl cluster-info --context kind-ros-e2e
Copy link
Contributor Author

Choose a reason for hiding this comment

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

gah external_ip succeds locally but it doesn't on the runner, have to check why

Fixes: #2
Fixes: #6

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
Makefile Outdated Show resolved Hide resolved
tests/e2e/e2e_suite_test.go Outdated Show resolved Hide resolved
tests/e2e/e2e_suite_test.go Outdated Show resolved Hide resolved
tests/sut/kubectl.go Outdated Show resolved Hide resolved
tests/sut/kubectl.go Outdated Show resolved Hide resolved
Copy link
Contributor

@Itxaka Itxaka left a comment

Choose a reason for hiding this comment

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

wow, I mean, its cool but a bit overboard with a lot of functions that we dont need. Looks good to me thought, just a couple of nits and a (future?) implementation issue.

@mudler
Copy link
Contributor Author

mudler commented Mar 29, 2022

wow, I mean, its cool but a bit overboard with a lot of functions that we dont need. Looks good to me thought, just a couple of nits and a (future?) implementation issue.

yup, I'm indeed not sure if just cut what we need here or just port it as a standalone lib. At the end, I see us reusing that code parts in the e2e tests and we could just reuse that code to quickly ramp-up without have to re-implement such helpers ourselves.

@mudler mudler marked this pull request as ready for review March 29, 2022 09:48
@mudler mudler force-pushed the e2e branch 14 times, most recently from 8340963 to 6215a7b Compare March 29, 2022 15:55
- Also add nginx as ingress as is more compliant to kind
- Move out some common code pieces
- Address points from review

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
Copy link
Member

@ldevulder ldevulder left a comment

Choose a reason for hiding this comment

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

2 comments a little bit late :) but as my bootstrapping tests conversion code to ginkgo as some similarities I will try to use the https://github.com/rancher-sandbox/ele-testhelpers lib.

In my current version I use some code from Epinio, but this lib could be more powerful. My main concern is to use kubectl command and not API, which looks like to be the case in the lib.


var _ = Describe("MachineRegistration e2e tests", func() {
k := kubectl.New()
Context("registration", func() {
Copy link
Member

Choose a reason for hiding this comment

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

Is Context really useful here? As there is only this one (or maybe more are planned?).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I hoped there was more in the pipeline for that change at hand 😅 but this will get bigger I'm pretty sure..

tests/e2e/e2e_suite_test.go Show resolved Hide resolved
@mudler
Copy link
Contributor Author

mudler commented Apr 5, 2022

2 comments a little bit late :) but as my bootstrapping tests conversion code to ginkgo as some similarities I will try to use the https://github.com/rancher-sandbox/ele-testhelpers lib.

In my current version I use some code from Epinio, but this lib could be more powerful. My main concern is to use kubectl command and not API, which looks like to be the case in the lib.

Yes, that is done in purpose to avoid to pinpoint kubernetes api versions in all the code consuming it downstream. It uses also standalone kubectl so we can just setup matrix tests without caring about the api versions attached to the test code

@ldevulder
Copy link
Member

It uses also standalone kubectl so we can just setup matrix tests without caring about the api versions attached to the test code

Yes, and it's better to use the command like a real user instead of the API for e2e tests IMO :-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setup e2e test suite Check using kind for testing the ros-operator
3 participants