Adds basic skeleton and tests for agentmanagement#5373
Merged
0xavi0 merged 2 commits intoJul 6, 2026
Conversation
This PR adds basic testing coverage skeleton and tests very basic things done by the agentmanagement component. Refers to: rancher#5372 Signed-off-by: Xavi Garcia <xavi.garcia@suse.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new envtest-backed Ginkgo integration test suite for the agentmanagement controller set, providing initial “smoke” and bootstrap-resource contract coverage to support future refactors (per #5372).
Changes:
- Introduces an
integrationtests/agentmanagementenvtest suite that boots the agentmanagement wrangler controllers. - Adds smoke tests asserting the controller harness starts and that bootstrap resources are applied.
- Adds contract-style tests that validate the exact bootstrap-created namespaces and ClusterRole policy rules.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| integrationtests/agentmanagement/suite_test.go | Sets up envtest, seeds config, builds an app context, and registers/starts agentmanagement controllers for the suite. |
| integrationtests/agentmanagement/smoke_test.go | Basic smoke assertions that the harness started and bootstrap resources exist. |
| integrationtests/agentmanagement/resources_test.go | Contract tests for resources.ApplyBootstrapResources outputs (namespaces + exact ClusterRole rules + stability checks). |
| integrationtests/agentmanagement/helpers_test.go | Shared helper assertions/utilities for fetching objects from the envtest API server. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
weyfonk
reviewed
Jul 2, 2026
| It("starts the controllers without error", func() { | ||
| // Reaching here means BeforeSuite completed — envtest started, | ||
| // Wrangler controllers registered and started. | ||
| Expect(true).To(BeTrue()) |
Contributor
There was a problem hiding this comment.
Thanks for the comment; I was confused here for a bit 😅
Signed-off-by: Xavi Garcia <xavi.garcia@suse.com>
weyfonk
approved these changes
Jul 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds basic testing coverage skeleton and tests very basic things done by the agentmanagement component.
Refers to: #5372
Additional Information
Checklist
- [ ] I have updated the documentation via a pull request in the fleet-product-docs repository.