Add envtest integration tests for kube controller#2487
Conversation
|
@ajssmith @fgiorgetti @c-kruse Thoughts on this set up? For now just added integration tests for |
There was a problem hiding this comment.
Suggest a separate issue/pr for changes to NewClient as scope separate/independent from envtest integration
|
|
||
| .PHONY: test-integration | ||
| test-integration: | ||
| @assets=$$(PATH="$$HOME/go/bin:$$PATH" setup-envtest use 1.33.0 -p path 2>/dev/null || PATH="$$HOME/go/bin:$$PATH" setup-envtest use -p path 2>/dev/null); \ |
There was a problem hiding this comment.
Suggestion for the setup-envtest tool and envtest system dependencies.
We should look at using a go tool to pin a setup-envtest version so that everyone doesn't immediately begin to drift and we don't need to make assumptions about the go binary path.
43674c5 to
313002e
Compare
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughAdds envtest-based integration testing for the Skupper Kubernetes controller, including dependency updates, a shared test harness, controller integration tests, a Makefile target, and documentation. ChangesKube Controller Integration Tests
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: b474ac35-816d-4f5e-bd02-4f19abb97778
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (7)
go.modtests/Makefiletests/integration/README.mdtests/integration/kube/controller/helpers_test.gotests/integration/kube/controller/listener_test.gotests/integration/kube/controller/site_test.gotests/integration/kube/controller/suite_test.go
313002e to
cf0464d
Compare
|
will need to rebase once #2507 is merged |
Fixes skupperproject#2486 Depends on skupperproject#2506 (NewClientFromRestConfig) for compilation.
5d804b1 to
cfeb6ad
Compare
| @@ -1,4 +1,7 @@ | |||
| ROOT_PATH := $(shell pwd) | |||
| SKUPPER_ROOT := $(abspath $(ROOT_PATH)/..) | |||
| TESTFLAGS ?= -v -race -short | |||
There was a problem hiding this comment.
Suggest we add -count=1 to disable test caching. If I run this today make test-integration; make test-integration ENVTEST_K8S_VERSION=1.30.0 the go tests only runs once (assuming it passes a first time).
Also -short does nothing right now, although it could be interesting to have short and long timeouts for local vs CI or something. I could go either way on enabling -race detection.
ajssmith
left a comment
There was a problem hiding this comment.
This looks good to me, thanks.
A suggestion would be to document in the README the USE_EXISTING_CLUSTER env var that can run the integration test against full cluster.
Fixes #2486
Summary by CodeRabbit
test-integrationMake target with configurableTESTFLAGSandENVTEST_K8S_VERSION.