-
Notifications
You must be signed in to change notification settings - Fork 49
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 controlplane upgrade e2e test using capi framework #845
base: main
Are you sure you want to change the base?
Conversation
c81ecf9
to
39692b5
Compare
2ee12be
to
117cc23
Compare
117cc23
to
2eb46c2
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.
Added couple questions to clarify things
Couple of small fixes IMO needed, looks pretty good in general
.golangci.yml
Outdated
@@ -17,4 +17,4 @@ linters: | |||
- gofmt # Checks whether code was gofmt-ed | |||
- goheader # Checks is file headers matche a given pattern | |||
- revive # Stricter drop-in replacement for golint | |||
- ginkgolinter # Enforces standards of using ginkgo and gomega | |||
- ginkgolinter # Enforces standards of using ginkgo and gomega |
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.
Do we need ginkgolinter
if we do not implement tests using Ginko?
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.
mm I don't know why this diff appears, at the beginning I added some linter-ignoring stuff when ginkgo was added but then I removed it after agree on remove ginkgo. Anyway ginkgolinter
was added some time ago probably for this usage: https://github.com/k0sproject/k0smotron/blob/main/internal/controller/k0smotron.io/suite_test.go 👈 I think is scaffolded code from kubebuilder. Doesn't add any value so I think could be removed
Done in 016c67a
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.
Is this a cluster definition for a single test scenario? If so, Maybe bit more descriptive name for the file and/or some comments in the file would be good.
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.
is a cluster predefined configuration template that can be used by more than one test scenario (using docker infra provider). It is what CAPI refers as "flavor". Another custer-template for some of our tests should be a definition using clusterclass for example. In this case this cluster-template flavor uses is called "OOC" because controlplane is Out-of-Cluster (k0scontrolplane). I can rename this template to cluster-template-k0scontrolplane
maybe.
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.
ae3a7fd
to
6e9350c
Compare
@jnummelin thanks for the feedback! Comments addressed. Some of them accidentally lost but addressed too 9c9b3c0 |
4fb27ea
to
9c418b4
Compare
Signed-off-by: Adrian Pedriza <adripedriza@gmail.com>
Signed-off-by: Adrian Pedriza <adripedriza@gmail.com>
Signed-off-by: Adrian Pedriza <adripedriza@gmail.com>
Signed-off-by: Adrian Pedriza <adripedriza@gmail.com>
Signed-off-by: Adrian Pedriza <adripedriza@gmail.com>
9c418b4
to
03ca44f
Compare
fix #775
This PR makes use of the e2e framework built by CAPI and used by several providers. This is intended to address current problems described in this issue such as code repetition or a proper collection of logs in case of failure. Also, this approach prepares the ground for testing using an agnostic infrastructure provider. By adopting this framework, much of the code required for each test (such as bootstrap management cluster setup) is imported from the CAPI framework. On the other hand, a log dump of all relevant test components logs + configuration used is implemented if the test fails, improving the debugging capability of the test in case of failure.
For now, a basic configuration is sufficient. The intention is to migrate the current CAPI smoke tests little by little from the current approach to the proposed one.