mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-25 01:00:16 -05:00
Use modern helpers from Go's testing.T API (#2692)
Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
This commit is contained in:
@@ -369,7 +369,7 @@ func TestStateRm_backupExplicit(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestStateRm_noState(t *testing.T) {
|
||||
testCwd(t)
|
||||
testCwdTemp(t)
|
||||
|
||||
p := testProvider()
|
||||
ui := new(cli.MockUi)
|
||||
@@ -393,7 +393,7 @@ func TestStateRm_noState(t *testing.T) {
|
||||
func TestStateRm_needsInit(t *testing.T) {
|
||||
td := t.TempDir()
|
||||
testCopyDir(t, testFixturePath("backend-change"), td)
|
||||
defer testChdir(t, td)()
|
||||
t.Chdir(td)
|
||||
|
||||
p := testProvider()
|
||||
ui := new(cli.MockUi)
|
||||
@@ -421,7 +421,7 @@ func TestStateRm_needsInit(t *testing.T) {
|
||||
func TestStateRm_backendState(t *testing.T) {
|
||||
td := t.TempDir()
|
||||
testCopyDir(t, testFixturePath("backend-unchanged"), td)
|
||||
defer testChdir(t, td)()
|
||||
t.Chdir(td)
|
||||
|
||||
state := states.BuildState(func(s *states.SyncState) {
|
||||
s.SetResourceInstanceCurrent(
|
||||
@@ -504,7 +504,7 @@ func TestStateRm_checkRequiredVersion(t *testing.T) {
|
||||
// Create a temporary working directory that is empty
|
||||
td := t.TempDir()
|
||||
testCopyDir(t, testFixturePath("command-check-required-version"), td)
|
||||
defer testChdir(t, td)()
|
||||
t.Chdir(td)
|
||||
|
||||
state := states.BuildState(func(s *states.SyncState) {
|
||||
s.SetResourceInstanceCurrent(
|
||||
|
||||
Reference in New Issue
Block a user