File tree Expand file tree Collapse file tree 5 files changed +20
-9
lines changed
Expand file tree Collapse file tree 5 files changed +20
-9
lines changed Original file line number Diff line number Diff line change 11package gcs
22
33import (
4+ "maps"
45 "reflect"
6+ "slices"
57 "strconv"
68
79 "github.com/gruntwork-io/terragrunt/internal/errors"
810 "github.com/gruntwork-io/terragrunt/internal/remotestate/backend"
911 "github.com/gruntwork-io/terragrunt/internal/util"
1012 "github.com/gruntwork-io/terragrunt/pkg/log"
1113 "github.com/mitchellh/mapstructure"
12- "golang.org/x/exp/slices"
13-
14- "maps"
1514)
1615
1716type Config map [string ]any
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ package gcs_test
33import (
44 "testing"
55
6- gcs "github.com/gruntwork-io/terragrunt/internal/remotestate/backend/gcs"
6+ "github.com/gruntwork-io/terragrunt/internal/remotestate/backend/gcs"
77 "github.com/gruntwork-io/terragrunt/test/helpers/logger"
88 "github.com/stretchr/testify/assert"
99 "github.com/stretchr/testify/require"
Original file line number Diff line number Diff line change 11package s3
22
33import (
4+ "maps"
45 "reflect"
56 "slices"
67
@@ -9,8 +10,6 @@ import (
910 "github.com/gruntwork-io/terragrunt/internal/util"
1011 "github.com/gruntwork-io/terragrunt/pkg/log"
1112 "github.com/mitchellh/mapstructure"
12-
13- "maps"
1413)
1514
1615const (
Original file line number Diff line number Diff line change 44 "testing"
55
66 s3backend "github.com/gruntwork-io/terragrunt/internal/remotestate/backend/s3"
7- "github.com/gruntwork-io/terragrunt/pkg/log "
7+ "github.com/gruntwork-io/terragrunt/test/helpers/logger "
88 "github.com/stretchr/testify/assert"
99 "github.com/stretchr/testify/require"
1010)
@@ -104,7 +104,7 @@ func TestParseExtendedS3Config_StringBoolCoercion(t *testing.T) {
104104 t .Run (tc .name , func (t * testing.T ) {
105105 t .Parallel ()
106106
107- extS3Cfg , err := tc .config .Normalize (log . Default ()).ParseExtendedS3Config ()
107+ extS3Cfg , err := tc .config .Normalize (logger . CreateLogger ()).ParseExtendedS3Config ()
108108 require .NoError (t , err )
109109
110110 tc .check (t , extS3Cfg )
@@ -124,6 +124,6 @@ func TestParseExtendedS3Config_InvalidStringBool(t *testing.T) {
124124 "use_lockfile" : "maybe" ,
125125 }
126126
127- _ , err := cfg .Normalize (log . Default ()).ParseExtendedS3Config ()
127+ _ , err := cfg .Normalize (logger . CreateLogger ()).ParseExtendedS3Config ()
128128 require .Error (t , err )
129129}
Original file line number Diff line number Diff line change @@ -190,6 +190,19 @@ func TestGetTFInitArgs_StringBoolCoercion(t *testing.T) {
190190 "-backend-config=use_lockfile=false" ,
191191 },
192192 },
193+ {
194+ "gcs-string-bool-skip-versioning" ,
195+ "gcs" ,
196+ map [string ]any {
197+ "bucket" : "my-bucket" ,
198+ "prefix" : "terraform.tfstate" ,
199+ "skip_bucket_versioning" : "true" ,
200+ },
201+ []string {
202+ "-backend-config=bucket=my-bucket" ,
203+ "-backend-config=prefix=terraform.tfstate" ,
204+ },
205+ },
193206 }
194207
195208 for _ , tc := range testCases {
You can’t perform that action at this time.
0 commit comments