@@ -6,7 +6,6 @@ package command
66import (
77 "context"
88 "fmt"
9- "io/ioutil"
109 "os"
1110 "path/filepath"
1211 "reflect"
@@ -389,7 +388,7 @@ func TestMetaBackend_configureNewBackendWithState(t *testing.T) {
389388
390389 // Verify the default paths don't exist
391390 if ! isEmptyState (DefaultStateFilename ) {
392- data , _ := ioutil .ReadFile (DefaultStateFilename )
391+ data , _ := os .ReadFile (DefaultStateFilename )
393392
394393 t .Fatal ("state should not exist, but contains:\n " , string (data ))
395394 }
@@ -439,7 +438,7 @@ func TestMetaBackend_configureNewBackendWithoutCopy(t *testing.T) {
439438
440439 // Verify the default paths don't exist
441440 if ! isEmptyState (DefaultStateFilename ) {
442- data , _ := ioutil .ReadFile (DefaultStateFilename )
441+ data , _ := os .ReadFile (DefaultStateFilename )
443442
444443 t .Fatal ("state should not exist, but contains:\n " , string (data ))
445444 }
@@ -484,7 +483,7 @@ func TestMetaBackend_configureNewBackendWithStateNoMigrate(t *testing.T) {
484483
485484 // Verify the default paths don't exist
486485 if ! isEmptyState (DefaultStateFilename ) {
487- data , _ := ioutil .ReadFile (DefaultStateFilename )
486+ data , _ := os .ReadFile (DefaultStateFilename )
488487
489488 t .Fatal ("state should not exist, but contains:\n " , string (data ))
490489 }
@@ -555,7 +554,7 @@ func TestMetaBackend_configureNewBackendWithStateExisting(t *testing.T) {
555554
556555 // Verify the default paths don't exist
557556 if ! isEmptyState (DefaultStateFilename ) {
558- data , _ := ioutil .ReadFile (DefaultStateFilename )
557+ data , _ := os .ReadFile (DefaultStateFilename )
559558
560559 t .Fatal ("state should not exist, but contains:\n " , string (data ))
561560 }
@@ -626,7 +625,7 @@ func TestMetaBackend_configureNewBackendWithStateExistingNoMigrate(t *testing.T)
626625
627626 // Verify the default paths don't exist
628627 if ! isEmptyState (DefaultStateFilename ) {
629- data , _ := ioutil .ReadFile (DefaultStateFilename )
628+ data , _ := os .ReadFile (DefaultStateFilename )
630629
631630 t .Fatal ("state should not exist, but contains:\n " , string (data ))
632631 }
@@ -1476,13 +1475,13 @@ func TestMetaBackend_configuredBackendUnset(t *testing.T) {
14761475
14771476 // Verify the default paths don't exist
14781477 if ! isEmptyState (DefaultStateFilename ) {
1479- data , _ := ioutil .ReadFile (DefaultStateFilename )
1478+ data , _ := os .ReadFile (DefaultStateFilename )
14801479 t .Fatal ("state should not exist, but contains:\n " , string (data ))
14811480 }
14821481
14831482 // Verify a backup doesn't exist
14841483 if ! isEmptyState (DefaultStateFilename + DefaultBackupExtension ) {
1485- data , _ := ioutil .ReadFile (DefaultStateFilename + DefaultBackupExtension )
1484+ data , _ := os .ReadFile (DefaultStateFilename + DefaultBackupExtension )
14861485 t .Fatal ("backup should not exist, but contains:\n " , string (data ))
14871486 }
14881487
@@ -1499,7 +1498,7 @@ func TestMetaBackend_configuredBackendUnset(t *testing.T) {
14991498
15001499 // Verify no backup since it was empty to start
15011500 if ! isEmptyState (DefaultStateFilename + DefaultBackupExtension ) {
1502- data , _ := ioutil .ReadFile (DefaultStateFilename + DefaultBackupExtension )
1501+ data , _ := os .ReadFile (DefaultStateFilename + DefaultBackupExtension )
15031502 t .Fatal ("backup state should be empty, but contains:\n " , string (data ))
15041503 }
15051504}
@@ -1941,7 +1940,7 @@ func TestMetaBackend_backendConfigToExtra(t *testing.T) {
19411940
19421941 // init again but remove the path option from the config
19431942 cfg := "terraform {\n backend \" local\" {}\n }\n "
1944- if err := ioutil .WriteFile ("main.tf" , []byte (cfg ), 0644 ); err != nil {
1943+ if err := os .WriteFile ("main.tf" , []byte (cfg ), 0644 ); err != nil {
19451944 t .Fatal (err )
19461945 }
19471946
0 commit comments