@@ -334,6 +334,30 @@ func TestMergeConfigFiles(t *testing.T) {
334334 PriorityThreshold : models .PriorityImportant ,
335335 },
336336 },
337+ {
338+ name : "only global config for attack surface monitoring" ,
339+ globalConfig : & models.Configuration {
340+ AttackSurface : & models.AttackSurface {
341+ Enable : true ,
342+ EnableDNSTraversal : true ,
343+ DomainNames : []string {"example.com" },
344+ IgnoreDomainNames : []string {"example2.com" },
345+ },
346+ },
347+ repoConfig : nil ,
348+ expected : & models.Configuration {
349+ EnablePullRequestReviews : models .Bool (true ),
350+ EnableIssueDashboards : models .Bool (true ),
351+ SeverityThreshold : parser .DefaultSeverityThreshold ,
352+ PriorityThreshold : parser .DefaultPriorityThreshold ,
353+ AttackSurface : & models.AttackSurface {
354+ Enable : true ,
355+ EnableDNSTraversal : true ,
356+ DomainNames : []string {"example.com" },
357+ IgnoreDomainNames : []string {"example2.com" },
358+ },
359+ },
360+ },
337361 } {
338362 t .Run (scenario .name , func (t * testing.T ) {
339363 config := MergeConfigFiles (parser .NewDefaultConfig (), scenario .globalConfig , scenario .repoConfig )
@@ -692,30 +716,6 @@ func TestMergeJira(t *testing.T) {
692716 },
693717 },
694718 },
695- {
696- name : "only global config for attack surface monitoring" ,
697- globalConfig : & models.Configuration {
698- AttackSurface : models.AttackSurface {
699- Enable : true ,
700- EnableDNSTraversal : true ,
701- DomainNames : []string {"example.com" },
702- IgnoreDomainNames : []string {"example2.com" },
703- },
704- },
705- repoConfig : nil ,
706- expected : & models.Configuration {
707- EnablePullRequestReviews : models .Bool (true ),
708- EnableIssueDashboards : models .Bool (true ),
709- SeverityThreshold : parser .DefaultSeverityThreshold ,
710- PriorityThreshold : parser .DefaultPriorityThreshold ,
711- AttackSurface : models.AttackSurface {
712- Enable : true ,
713- EnableDNSTraversal : true ,
714- DomainNames : []string {"example.com" },
715- IgnoreDomainNames : []string {"example2.com" },
716- },
717- },
718- },
719719 } {
720720 t .Run (scenario .name , func (t * testing.T ) {
721721 config := MergeConfigFiles (parser .NewDefaultConfig (), scenario .globalConfig , scenario .repoConfig )
0 commit comments