@@ -1048,11 +1048,13 @@ func TestParseTerragruntJsonConfigTerraformWithMultipleExtraArguments(t *testing
10481048func TestFindConfigFilesInPathNone (t * testing.T ) {
10491049 t .Parallel ()
10501050
1051+ l := createLogger ()
1052+
10511053 expected := []string {}
10521054 terragruntOptions , err := options .NewTerragruntOptionsForTest ("test" )
10531055 require .NoError (t , err )
10541056
1055- actual , err := config .FindConfigFilesInPath ("../test/fixtures/config-files/none" , terragruntOptions )
1057+ actual , err := config .FindConfigFilesInPath (l , "../test/fixtures/config-files/none" , terragruntOptions )
10561058
10571059 require .NoError (t , err , "Unexpected error: %v" , err )
10581060 assert .Equal (t , expected , actual )
@@ -1061,11 +1063,13 @@ func TestFindConfigFilesInPathNone(t *testing.T) {
10611063func TestFindConfigFilesInPathOneConfig (t * testing.T ) {
10621064 t .Parallel ()
10631065
1066+ l := createLogger ()
1067+
10641068 expected := []string {"../test/fixtures/config-files/one-config/subdir/terragrunt.hcl" }
10651069 terragruntOptions , err := options .NewTerragruntOptionsForTest ("test" )
10661070 require .NoError (t , err )
10671071
1068- actual , err := config .FindConfigFilesInPath ("../test/fixtures/config-files/one-config" , terragruntOptions )
1072+ actual , err := config .FindConfigFilesInPath (l , "../test/fixtures/config-files/one-config" , terragruntOptions )
10691073
10701074 require .NoError (t , err , "Unexpected error: %v" , err )
10711075 assert .Equal (t , expected , actual )
@@ -1074,11 +1078,13 @@ func TestFindConfigFilesInPathOneConfig(t *testing.T) {
10741078func TestFindConfigFilesInPathOneJsonConfig (t * testing.T ) {
10751079 t .Parallel ()
10761080
1081+ l := createLogger ()
1082+
10771083 expected := []string {"../test/fixtures/config-files/one-json-config/subdir/terragrunt.hcl.json" }
10781084 terragruntOptions , err := options .NewTerragruntOptionsForTest ("test" )
10791085 require .NoError (t , err )
10801086
1081- actual , err := config .FindConfigFilesInPath ("../test/fixtures/config-files/one-json-config" , terragruntOptions )
1087+ actual , err := config .FindConfigFilesInPath (l , "../test/fixtures/config-files/one-json-config" , terragruntOptions )
10821088
10831089 require .NoError (t , err , "Unexpected error: %v" , err )
10841090 assert .Equal (t , expected , actual )
@@ -1087,6 +1093,8 @@ func TestFindConfigFilesInPathOneJsonConfig(t *testing.T) {
10871093func TestFindConfigFilesInPathMultipleConfigs (t * testing.T ) {
10881094 t .Parallel ()
10891095
1096+ l := createLogger ()
1097+
10901098 expected := []string {
10911099 "../test/fixtures/config-files/multiple-configs/terragrunt.hcl" ,
10921100 "../test/fixtures/config-files/multiple-configs/subdir-2/subdir/terragrunt.hcl" ,
@@ -1095,7 +1103,7 @@ func TestFindConfigFilesInPathMultipleConfigs(t *testing.T) {
10951103 terragruntOptions , err := options .NewTerragruntOptionsForTest ("test" )
10961104 require .NoError (t , err )
10971105
1098- actual , err := config .FindConfigFilesInPath ("../test/fixtures/config-files/multiple-configs" , terragruntOptions )
1106+ actual , err := config .FindConfigFilesInPath (l , "../test/fixtures/config-files/multiple-configs" , terragruntOptions )
10991107
11001108 require .NoError (t , err , "Unexpected error: %v" , err )
11011109 assert .ElementsMatch (t , expected , actual )
@@ -1104,6 +1112,8 @@ func TestFindConfigFilesInPathMultipleConfigs(t *testing.T) {
11041112func TestFindConfigFilesInPathMultipleJsonConfigs (t * testing.T ) {
11051113 t .Parallel ()
11061114
1115+ l := createLogger ()
1116+
11071117 expected := []string {
11081118 "../test/fixtures/config-files/multiple-json-configs/terragrunt.hcl.json" ,
11091119 "../test/fixtures/config-files/multiple-json-configs/subdir-2/subdir/terragrunt.hcl.json" ,
@@ -1112,7 +1122,7 @@ func TestFindConfigFilesInPathMultipleJsonConfigs(t *testing.T) {
11121122 terragruntOptions , err := options .NewTerragruntOptionsForTest ("test" )
11131123 require .NoError (t , err )
11141124
1115- actual , err := config .FindConfigFilesInPath ("../test/fixtures/config-files/multiple-json-configs" , terragruntOptions )
1125+ actual , err := config .FindConfigFilesInPath (l , "../test/fixtures/config-files/multiple-json-configs" , terragruntOptions )
11161126
11171127 require .NoError (t , err , "Unexpected error: %v" , err )
11181128 assert .ElementsMatch (t , expected , actual )
@@ -1121,6 +1131,8 @@ func TestFindConfigFilesInPathMultipleJsonConfigs(t *testing.T) {
11211131func TestFindConfigFilesInPathMultipleMixedConfigs (t * testing.T ) {
11221132 t .Parallel ()
11231133
1134+ l := createLogger ()
1135+
11241136 expected := []string {
11251137 "../test/fixtures/config-files/multiple-mixed-configs/terragrunt.hcl.json" ,
11261138 "../test/fixtures/config-files/multiple-mixed-configs/subdir-2/subdir/terragrunt.hcl" ,
@@ -1129,7 +1141,7 @@ func TestFindConfigFilesInPathMultipleMixedConfigs(t *testing.T) {
11291141 terragruntOptions , err := options .NewTerragruntOptionsForTest ("test" )
11301142 require .NoError (t , err )
11311143
1132- actual , err := config .FindConfigFilesInPath ("../test/fixtures/config-files/multiple-mixed-configs" , terragruntOptions )
1144+ actual , err := config .FindConfigFilesInPath (l , "../test/fixtures/config-files/multiple-mixed-configs" , terragruntOptions )
11331145
11341146 require .NoError (t , err , "Unexpected error: %v" , err )
11351147 assert .ElementsMatch (t , expected , actual )
@@ -1138,13 +1150,15 @@ func TestFindConfigFilesInPathMultipleMixedConfigs(t *testing.T) {
11381150func TestFindConfigFilesIgnoresTerragruntCache (t * testing.T ) {
11391151 t .Parallel ()
11401152
1153+ l := createLogger ()
1154+
11411155 expected := []string {
11421156 "../test/fixtures/config-files/ignore-cached-config/terragrunt.hcl" ,
11431157 }
11441158 terragruntOptions , err := options .NewTerragruntOptionsForTest ("test" )
11451159 require .NoError (t , err )
11461160
1147- actual , err := config .FindConfigFilesInPath ("../test/fixtures/config-files/ignore-cached-config" , terragruntOptions )
1161+ actual , err := config .FindConfigFilesInPath (l , "../test/fixtures/config-files/ignore-cached-config" , terragruntOptions )
11481162
11491163 require .NoError (t , err , "Unexpected error: %v" , err )
11501164 assert .Equal (t , expected , actual )
@@ -1153,6 +1167,8 @@ func TestFindConfigFilesIgnoresTerragruntCache(t *testing.T) {
11531167func TestFindConfigFilesIgnoresTerraformDataDir (t * testing.T ) {
11541168 t .Parallel ()
11551169
1170+ l := createLogger ()
1171+
11561172 expected := []string {
11571173 "../test/fixtures/config-files/ignore-terraform-data-dir/.tf_data/modules/mod/terragrunt.hcl" ,
11581174 "../test/fixtures/config-files/ignore-terraform-data-dir/subdir/terragrunt.hcl" ,
@@ -1161,7 +1177,7 @@ func TestFindConfigFilesIgnoresTerraformDataDir(t *testing.T) {
11611177 terragruntOptions , err := options .NewTerragruntOptionsForTest ("test" )
11621178 require .NoError (t , err )
11631179
1164- actual , err := config .FindConfigFilesInPath ("../test/fixtures/config-files/ignore-terraform-data-dir" , terragruntOptions )
1180+ actual , err := config .FindConfigFilesInPath (l , "../test/fixtures/config-files/ignore-terraform-data-dir" , terragruntOptions )
11651181
11661182 require .NoError (t , err , "Unexpected error: %v" , err )
11671183 assert .ElementsMatch (t , expected , actual )
@@ -1170,6 +1186,8 @@ func TestFindConfigFilesIgnoresTerraformDataDir(t *testing.T) {
11701186func TestFindConfigFilesIgnoresTerraformDataDirEnv (t * testing.T ) {
11711187 t .Parallel ()
11721188
1189+ l := createLogger ()
1190+
11731191 expected := []string {
11741192 "../test/fixtures/config-files/ignore-terraform-data-dir/subdir/terragrunt.hcl" ,
11751193 "../test/fixtures/config-files/ignore-terraform-data-dir/subdir/.terraform/modules/mod/terragrunt.hcl" ,
@@ -1179,7 +1197,7 @@ func TestFindConfigFilesIgnoresTerraformDataDirEnv(t *testing.T) {
11791197
11801198 terragruntOptions .Env ["TF_DATA_DIR" ] = ".tf_data"
11811199
1182- actual , err := config .FindConfigFilesInPath ("../test/fixtures/config-files/ignore-terraform-data-dir" , terragruntOptions )
1200+ actual , err := config .FindConfigFilesInPath (l , "../test/fixtures/config-files/ignore-terraform-data-dir" , terragruntOptions )
11831201
11841202 require .NoError (t , err , "Unexpected error: %v" , err )
11851203 assert .ElementsMatch (t , expected , actual )
@@ -1188,6 +1206,8 @@ func TestFindConfigFilesIgnoresTerraformDataDirEnv(t *testing.T) {
11881206func TestFindConfigFilesIgnoresTerraformDataDirEnvPath (t * testing.T ) {
11891207 t .Parallel ()
11901208
1209+ l := createLogger ()
1210+
11911211 expected := []string {
11921212 "../test/fixtures/config-files/ignore-terraform-data-dir/.tf_data/modules/mod/terragrunt.hcl" ,
11931213 "../test/fixtures/config-files/ignore-terraform-data-dir/subdir/terragrunt.hcl" ,
@@ -1198,7 +1218,7 @@ func TestFindConfigFilesIgnoresTerraformDataDirEnvPath(t *testing.T) {
11981218
11991219 terragruntOptions .Env ["TF_DATA_DIR" ] = "subdir/.tf_data"
12001220
1201- actual , err := config .FindConfigFilesInPath ("../test/fixtures/config-files/ignore-terraform-data-dir" , terragruntOptions )
1221+ actual , err := config .FindConfigFilesInPath (l , "../test/fixtures/config-files/ignore-terraform-data-dir" , terragruntOptions )
12021222
12031223 require .NoError (t , err , "Unexpected error: %v" , err )
12041224 assert .ElementsMatch (t , expected , actual )
@@ -1207,6 +1227,8 @@ func TestFindConfigFilesIgnoresTerraformDataDirEnvPath(t *testing.T) {
12071227func TestFindConfigFilesIgnoresTerraformDataDirEnvRoot (t * testing.T ) {
12081228 t .Parallel ()
12091229
1230+ l := createLogger ()
1231+
12101232 cwd , err := os .Getwd ()
12111233 require .NoError (t , err )
12121234
@@ -1216,7 +1238,7 @@ func TestFindConfigFilesIgnoresTerraformDataDirEnvRoot(t *testing.T) {
12161238
12171239 terragruntOptions .Env ["TF_DATA_DIR" ] = filepath .Join (workingDir , ".tf_data" )
12181240
1219- actual , err := config .FindConfigFilesInPath (workingDir , terragruntOptions )
1241+ actual , err := config .FindConfigFilesInPath (l , workingDir , terragruntOptions )
12201242 require .NoError (t , err , "Unexpected error: %v" , err )
12211243
12221244 // Create expected paths using filepath.Join for cross-platform compatibility
@@ -1248,6 +1270,8 @@ func TestFindConfigFilesIgnoresTerraformDataDirEnvRoot(t *testing.T) {
12481270func TestFindConfigFilesIgnoresDownloadDir (t * testing.T ) {
12491271 t .Parallel ()
12501272
1273+ l := createLogger ()
1274+
12511275 expected := []string {
12521276 "../test/fixtures/config-files/multiple-configs/terragrunt.hcl" ,
12531277 "../test/fixtures/config-files/multiple-configs/subdir-3/terragrunt.hcl" ,
@@ -1257,7 +1281,7 @@ func TestFindConfigFilesIgnoresDownloadDir(t *testing.T) {
12571281
12581282 terragruntOptions .DownloadDir = "../test/fixtures/config-files/multiple-configs/subdir-2"
12591283
1260- actual , err := config .FindConfigFilesInPath ("../test/fixtures/config-files/multiple-configs" , terragruntOptions )
1284+ actual , err := config .FindConfigFilesInPath (l , "../test/fixtures/config-files/multiple-configs" , terragruntOptions )
12611285
12621286 require .NoError (t , err , "Unexpected error: %v" , err )
12631287 assert .ElementsMatch (t , expected , actual )
0 commit comments