From deed538ea89127fb63ca5d7e9698c8a1807a9ce4 Mon Sep 17 00:00:00 2001 From: Sarah French <15078782+SarahFrench@users.noreply.github.com> Date: Wed, 20 May 2026 16:09:56 +0100 Subject: [PATCH] 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. --- internal/command/init_test.go | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/internal/command/init_test.go b/internal/command/init_test.go index c5f34aa816..c5c6d57e8c 100644 --- a/internal/command/init_test.go +++ b/internal/command/init_test.go @@ -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.