test(fleet/serverhost): improve acceptance test coverage#2825
Draft
github-actions[bot] wants to merge 2 commits intomainfrom
Draft
test(fleet/serverhost): improve acceptance test coverage#2825github-actions[bot] wants to merge 2 commits intomainfrom
github-actions[bot] wants to merge 2 commits intomainfrom
Conversation
…rver host Address schema coverage gaps identified in issue #2824: - Update/main.tf now uses default=true and two hosts to test update path - TestAccResourceFleetServerHost update step asserts both hosts and default=true - Add TestAccResourceFleetServerHost_computedID to verify API-assigned host_id Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Contributor
Author
|
✅ PR Changelog Check passed — |
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.
Summary
Addresses schema coverage gaps for
elasticstack_fleet_server_hostidentified in #2824:Gap 1+2 (
defaultandhostsupdate path): Updatedtestdata/TestAccResourceFleetServerHost/update/main.tfto setdefault = trueand two hosts ((fleetserver/redacted),(fleetserver2/redacted)). The update step inTestAccResourceFleetServerHostnow asserts bothdefault = "true"andhosts.# = "2"with both individual host values, giving real update coverage to previously no-op test data.Gap 3 (
host_idcomputed path): AddedTestAccResourceFleetServerHost_computedIDtest with a new fixture (testdata/TestAccResourceFleetServerHost_computedID/create/main.tf) that omitshost_idand usesTestCheckResourceAttrSetto verify the provider populates it from the API response.Test plan
go buildexits 0)go test -run '^$' ./internal/fleet/serverhost/...exits 0)TestAccResourceFleetServerHost— update step now exercisesdefault=trueand two hostsTestAccResourceFleetServerHost_computedID— verifies API-assignedhost_idis non-emptyAcceptance tests require a running Kibana/Fleet instance and will execute in CI.
Closes #2824
🤖 Generated with [Claude Code]((claude.com/redacted)