Skip to content

Commit 9beb0fd

Browse files
committed
update the config file logic
1 parent a2a0f6a commit 9beb0fd

File tree

1 file changed

+0
-50
lines changed

1 file changed

+0
-50
lines changed

pkg/merger/merger_test.go

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,6 @@ func TestMergeConfigFiles(t *testing.T) {
8282
SeverityThreshold: models.SeverityHigh,
8383
PriorityThreshold: models.PriorityImportant,
8484
},
85-
AWS: &models.AWS{
86-
Enable: true,
87-
RoleNameToAssume: "nullify-role",
88-
PrimaryAccountID: "123456789012",
89-
PrimaryRegion: "ap-southeast-2",
90-
TargetRegions: &[]string{"ap-southeast-2", "us-east-2"},
91-
TargetAccounts: &[]string{"123456789012", "123456789013"},
92-
},
9385
},
9486
},
9587
expected: &models.Configuration{
@@ -148,14 +140,6 @@ func TestMergeConfigFiles(t *testing.T) {
148140
SeverityThreshold: models.SeverityHigh,
149141
PriorityThreshold: models.PriorityImportant,
150142
},
151-
AWS: &models.AWS{
152-
Enable: true,
153-
RoleNameToAssume: "nullify-role",
154-
PrimaryAccountID: "123456789012",
155-
PrimaryRegion: "ap-southeast-2",
156-
TargetRegions: &[]string{"ap-southeast-2", "us-east-2"},
157-
TargetAccounts: &[]string{"123456789012", "123456789013"},
158-
},
159143
},
160144
},
161145
},
@@ -220,14 +204,6 @@ func TestMergeConfigFiles(t *testing.T) {
220204
Low: "low",
221205
},
222206
},
223-
AWS: &models.AWS{
224-
Enable: true,
225-
RoleNameToAssume: "nullify-role",
226-
PrimaryAccountID: "123456789012",
227-
PrimaryRegion: "ap-southeast-2",
228-
TargetRegions: &[]string{"ap-southeast-2", "us-east-2"},
229-
TargetAccounts: &[]string{"123456789012", "123456789013"},
230-
},
231207
},
232208
},
233209
repoConfig: nil,
@@ -293,14 +269,6 @@ func TestMergeConfigFiles(t *testing.T) {
293269
Low: "low",
294270
},
295271
},
296-
AWS: &models.AWS{
297-
Enable: true,
298-
RoleNameToAssume: "nullify-role",
299-
PrimaryAccountID: "123456789012",
300-
PrimaryRegion: "ap-southeast-2",
301-
TargetRegions: &[]string{"ap-southeast-2", "us-east-2"},
302-
TargetAccounts: &[]string{"123456789012", "123456789013"},
303-
},
304272
},
305273
},
306274
},
@@ -454,24 +422,6 @@ func TestMergeConfigFiles(t *testing.T) {
454422
},
455423
},
456424
},
457-
{
458-
name: "attack surface with AWS integration merge",
459-
globalConfig: &models.Configuration{
460-
AttackSurface: &models.AttackSurface{
461-
Enable: true,
462-
},
463-
},
464-
repoConfig: nil,
465-
expected: &models.Configuration{
466-
EnablePullRequestReviews: models.Bool(true),
467-
EnableIssueDashboards: models.Bool(true),
468-
SeverityThreshold: parser.DefaultSeverityThreshold,
469-
PriorityThreshold: parser.DefaultPriorityThreshold,
470-
AttackSurface: &models.AttackSurface{
471-
Enable: true,
472-
},
473-
},
474-
},
475425
} {
476426
t.Run(scenario.name, func(t *testing.T) {
477427
config := MergeConfigFiles(parser.NewDefaultConfig(), scenario.globalConfig, scenario.repoConfig)

0 commit comments

Comments
 (0)