Skip to content

test(fleet/serverhost): improve acceptance test coverage#2825

Draft
github-actions[bot] wants to merge 2 commits intomainfrom
code-factory/issue-2824-2e5208ca82b6da8e
Draft

test(fleet/serverhost): improve acceptance test coverage#2825
github-actions[bot] wants to merge 2 commits intomainfrom
code-factory/issue-2824-2e5208ca82b6da8e

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented May 9, 2026

Summary

Addresses schema coverage gaps for elasticstack_fleet_server_host identified in #2824:

  • Gap 1+2 (default and hosts update path): Updated testdata/TestAccResourceFleetServerHost/update/main.tf to set default = true and two hosts ((fleetserver/redacted), (fleetserver2/redacted)). The update step in TestAccResourceFleetServerHost now asserts both default = "true" and hosts.# = "2" with both individual host values, giving real update coverage to previously no-op test data.

  • Gap 3 (host_id computed path): Added TestAccResourceFleetServerHost_computedID test with a new fixture (testdata/TestAccResourceFleetServerHost_computedID/create/main.tf) that omits host_id and uses TestCheckResourceAttrSet to verify the provider populates it from the API response.

Test plan

  • Provider binary builds (go build exits 0)
  • Test package compiles (go test -run '^$' ./internal/fleet/serverhost/... exits 0)
  • TestAccResourceFleetServerHost — update step now exercises default=true and two hosts
  • TestAccResourceFleetServerHost_computedID — verifies API-assigned host_id is non-empty

Acceptance tests require a running Kibana/Fleet instance and will execute in CI.

Closes #2824

🤖 Generated with [Claude Code]((claude.com/redacted)

Generated by Code Factory Issue Intake · ● 414.9K ·

…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]>
@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented May 9, 2026

PR Changelog Check passedno-changelog label is set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[schema-coverage] elasticstack_fleet_server_host: schema coverage gaps in acceptance tests

1 participant