WIP: Update collection profiles e2e tests - #31477
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: simonpasquier The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
WalkthroughCollection profile tests now discover supported profiles from managed monitors, preserve existing operator ConfigMap settings, use typed selectors and shared assertions, and verify cleanup when configuration did not previously exist. ChangesPrometheus collection profile tests
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 13 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (13 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
/uncc @rexagod |
|
/test e2e-gcp-ovn |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
test/extended/prometheus/collection_profiles.go (1)
59-62: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winMove
collectionProfilesSupportedListintorunner.
collectionProfilesSupportedListis mutable state populated inBeforeAlland read by bothItblocks. Store it asrunner.supportedCollectionProfilesto keep discovered test state with the existing lifecycle state and avoid package-level mutable state.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test/extended/prometheus/collection_profiles.go` around lines 59 - 62, Move collectionProfilesSupportedList from package scope into the runner state as runner.supportedCollectionProfiles. Update its runtime initialization in BeforeAll and both It blocks to access the runner field, preserving the existing discovery and test behavior while removing the package-level mutable variable.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@test/extended/prometheus/collection_profiles.go`:
- Around line 59-62: Move collectionProfilesSupportedList from package scope
into the runner state as runner.supportedCollectionProfiles. Update its runtime
initialization in BeforeAll and both It blocks to access the runner field,
preserving the existing discovery and test behavior while removing the
package-level mutable variable.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 70a77c8f-a3de-4f78-800a-e8daed9fc1fa
📒 Files selected for processing (1)
test/extended/prometheus/collection_profiles.go
|
@simonpasquier: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary by CodeRabbit