Skip to content

Prepare stacks integration tests for tfe release#1298

Open
aaabdelgany wants to merge 11 commits intomainfrom
abdu/remove_stacks_test_skips
Open

Prepare stacks integration tests for tfe release#1298
aaabdelgany wants to merge 11 commits intomainfrom
abdu/remove_stacks_test_skips

Conversation

@aaabdelgany
Copy link
Copy Markdown
Contributor

@aaabdelgany aaabdelgany commented Mar 24, 2026

Description

This PR removes the beta skip flags in all of the stacks integration tests to ensure that they start running in CI. It also removes any references to stack_diagnostics#acknowledge which is something that was removed as part of the Stacks GA release and we just happened to miss it in go-tfe.

Testing plan

External links

Output from tests

Including output from tests may require access to a TFE instance. Ignore this section if you have no environment to test against.

go test -run TestStack
PASS
ok  	github.com/hashicorp/go-tfe	148.193s
...

Rollback Plan

Changes to Security Controls

@datadog-terraform-cloud-hashicorp
Copy link
Copy Markdown

datadog-terraform-cloud-hashicorp bot commented Mar 24, 2026

⚠️ Tests

Fix all issues with Cursor

⚠️ Other Violations

❄️ 1 New flaky test detected

    TestStackDiagnosticsRead from stack_diagnostic_integration_test.go   View in Datadog   (Fix with Cursor)

🧪 1 Test failed

TestStackDeploymentStepsRead from stack_deployment_steps_integration_test.go   View in Datadog   (Fix with Cursor)
runtime error: index out of range [0] with length 0
This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 45bf66e | Docs | Was this helpful? Give us feedback!

@aaabdelgany aaabdelgany marked this pull request as ready for review April 7, 2026 21:57
@aaabdelgany aaabdelgany requested a review from a team as a code owner April 7, 2026 21:57
@aaabdelgany aaabdelgany changed the title Remove skipunlessbeta from the stacks tests Prepare stacks integration tests for tfe release Apr 7, 2026
"testing"
)

func stackVCSRepoIdentifier(t *testing.T) string {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Comment thread stack_test_helpers_test.go Outdated
Comment thread stack_diagnostic.go
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Stacks integration test suite to run against a configurable VCS repo in CI (rather than a hardcoded public repo), removes beta gating from most Stacks tests, and deletes the StackDiagnostics.Acknowledge API which no longer exists post-Stacks GA.

Changes:

  • Replace hardcoded stacks VCS repo identifiers in integration tests with an env-driven helper (GITHUB_STACK_IDENTIFIER).
  • Remove skipUnlessBeta(t) from multiple Stacks integration tests so they can run in CI.
  • Remove StackDiagnostics.Acknowledge and related acknowledged fields/assertions; update docs/CI env vars accordingly.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
variable_set_test.go Updates stack repo identifier usage in variable set + stacks tests.
stack_test_helpers_test.go Adds helper to fetch GITHUB_STACK_IDENTIFIER and skip when unset.
stack_state_integration_test.go Unskips beta gating and switches to env-driven stack repo identifier.
stack_integration_test.go Unskips beta gating and switches to env-driven stack repo identifier.
stack_diagnostic_integration_test.go Removes acknowledge testing and updates diagnostics read assertions + repo/branch usage.
stack_diagnostic.go Removes Acknowledge from public interface and drops acknowledged fields from model.
stack_deployment_steps_integration_test.go Unskips beta gating, uses env-driven repo identifier, and uses status constant.
stack_deployment_runs_integration_test.go Unskips beta gating and switches to env-driven stack repo identifier.
stack_deployment_integration_test.go Unskips beta gating and switches to env-driven stack repo identifier.
stack_deployment_groups_summary_integration_test.go Unskips beta gating and switches to env-driven stack repo identifier.
stack_deployment_groups_integration_test.go Unskips beta gating and switches to env-driven stack repo identifier.
stack_configuration_summary_integration_test.go Unskips beta gating and switches to env-driven stack repo identifier.
stack_configuration_integration_test.go Unskips beta gating, switches repo identifier to env-driven helper, and changes diagnostics branch.
docs/TESTS.md Documents stacks-related env vars for running tests locally.
CHANGELOG.md Adds an entry about unskipping stacks tests and removing acknowledge.
.github/actions/test-go-tfe/action.yml Exports GITHUB_STACK_IDENTIFIER for CI test runs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread stack_configuration_integration_test.go
Comment thread .github/actions/test-go-tfe/action.yml
Comment thread CHANGELOG.md
Comment thread variable_set_test.go
Comment thread variable_set_test.go
Comment thread stack_diagnostic.go
Comment thread docs/TESTS.md
Comment thread stack_diagnostic_integration_test.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants