chore: Remove unneeded init test (#38622)

Follow up to https://github.com/hashicorp/terraform/pull/38391

That PR added tests showing that upgrading the provider used for PSS is blocked in init. There are no other upgrade-related user stories related to PSS in init, as upgrading the state storage provider will only be possible through a new `state migrate` command in future. Therefore these TODOs etc should be removed.
This commit is contained in:
Sarah French 2026-05-20 16:09:56 +01:00 committed by GitHub
parent d75460af6d
commit deed538ea8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3944,7 +3944,6 @@ func TestInit_stateStore_newWorkingDir(t *testing.T) {
args := []string{
"-enable-pluggable-state-storage-experiment=true",
// This test doesn't need -safe-init in the flags due to the location of the provider
}
code := c.Run(args)
testOutput := done(t)
@ -4226,7 +4225,7 @@ func TestInit_stateStore_newWorkingDir(t *testing.T) {
"hashicorp/test": {"1.2.3"},
})
// Set up providers for use in the second init attempt after the user adds the -safe-init flag.
// Set up providers for use in the second init attempt.
mockProvider := mockPluggableStateStorageProvider()
ui := new(cli.MockUi)
@ -4944,16 +4943,6 @@ func TestInit_stateStore_configChanges(t *testing.T) {
// removed from this file in the same commit as this TODO.
}
func TestInit_stateStore_providerUpgrade(t *testing.T) {
t.Skip("See TODOs below. This test was removed as part of TF-36263")
// TODO: Add a test showing that provider updated in init that affect the PSS provider are blocked and users
// are prompted to run state migrate or pin the PSS provider version and re-run init -upgrade.
// TODO: once state migrate command is implemented, add test cases in state_migrate_test.go that show:
// 1) a migration when the provider version is updated.
// 2) a migration when the provider version is updated and the schema has a breaking change.
}
// Test a scenario where the configuration changes but the -backend-config CLI flags compensate for those changes
// to result in the state store being configured in the same way. In this scenario the user isn't prompted to migrate
// state but the backend state file is updated with a new hash to reflect the new configuration's values.