This repository has been archived by the owner on Sep 14, 2020. It is now read-only.
Test end-to-end with the real cluster (minikube) #54
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With this, the framework is tested for the very basic things, which can be missed in the unit-test: that it starts and works at all, and communicates with the Kubernetes API normally: both for watching and for patching.
Previously, we had an internal incident when the operator failed to start since the RBAC permissions were missing, but the unit-tests were all green. Now, such things should be detected.
The e2e tests are executed at the end, since they are usually slow (tens of seconds), and want the regular unit-tests to provide the results fast.
More e2e tests will be added in separate PRs. Currently, it is only a supporting infrastructure for this kind of tests, and a demo with the "./examples/" (also to check that the examples are still valid).
Kubernetes 1.11.x is disabled since Minikube/kubeadm fails on the CRI preflight checks, and neither Kubernetes nor Minikube are our system-under-test — the framework and its examples are the the system-under-test.
Kubernetes 1.10.x is disabled due to conflicting behaviour of
spec.version
in CRD files: either 1.10 or 1.14 fails, but 1.14 is valuable as the future release, so 1.10 can be sacrificed (to not introduce the legacy on the project start).This is how it looks in Travis (as an example): https://travis-ci.org/nolar/kopf/builds/527762283