-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Convert legacy docker tests from bash to golang #11357
Conversation
Signed-off-by: Derek Nola <[email protected]>
Signed-off-by: Derek Nola <[email protected]>
f171bd5
to
85373fd
Compare
Prebuild K3s Go Tests Strip go test binaries to reduce size Crank native GHA compression Signed-off-by: Derek Nola <[email protected]>
Signed-off-by: Derek Nola <[email protected]>
Signed-off-by: Derek Nola <[email protected]>
Signed-off-by: Derek Nola <[email protected]>
Signed-off-by: Derek Nola <[email protected]>
Signed-off-by: Derek Nola <[email protected]>
Signed-off-by: Derek Nola <[email protected]>
Signed-off-by: Derek Nola <[email protected]>
Signed-off-by: Derek Nola <[email protected]>
Signed-off-by: Derek Nola <[email protected]>
85373fd
to
66340b3
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #11357 +/- ##
==========================================
- Coverage 47.18% 38.05% -9.14%
==========================================
Files 179 162 -17
Lines 18600 18010 -590
==========================================
- Hits 8776 6853 -1923
- Misses 8469 9959 +1490
+ Partials 1355 1198 -157
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
one small nit, LGTM otherwise!
// TODO the below functions are duplicated in the integration test utils. Consider combining into commmon package | ||
// DeploymentsReady checks if the provided list of deployments are ready, otherwise returns an error |
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.
👍🏻 on combining these as soon as possible.
We also have another copy in rke2. Maybe we need a common repo for the test framework. Maybe there already is one from k8s and we should be using that instead.
Signed-off-by: Derek Nola <[email protected]>
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.
Just one small wrong comment.
Future work is to potentially combine all 3 frameworks where it makes sense.
That would be awesome. It feels like we are testing some stuff three times :)
spec: | ||
containers: | ||
- name: stargz-snapshot-test | ||
image: "ghcr.io/stargz-containers/k3s-test-ubuntu:20.04-esgz" |
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.
ubuntu:20.04
oh no, so old
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.
Yeah there is future work to potentially:
- Update this image
- No longer test this functionality, IDK how many people are still using this.
- Move to a newer test image that supports the same thing from someone else.
Signed-off-by: Derek Nola <[email protected]>
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.
Maybe squash when merging?
Yeah I'm gonna squash |
Background
The current docker tests use a complex series of bash function hooks to construct k3s cluster out of docker containers, using the
rancher/k3s
image we publish. These tests are difficult to read, difficult to write, and do not match the ginkgo/gomega centric BDD testing frameworks we have constructed for integration and E2E tests.Proposed Changes
compat
test is nowskew
test, as we are testing the skew policy of K8s.Note: For now this is going to exist alongside the legacy docker tests. More work needs to be done to ensure things like log output and failures are handled effectively.
Types of Changes
Major CI change, Testing
Verification
https://github.com/k3s-io/k3s/actions/runs/12019291772
Testing
Its all new tests!
Linked Issues
TBD
User-Facing Change
Further Comments