Skip to content

Commit 512969f

Browse files
fix test
1 parent 121bef8 commit 512969f

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

pkg/merger/merger_test.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -340,13 +340,13 @@ func TestMergeConfigFiles(t *testing.T) {
340340
AttackSurface: &models.AttackSurface{
341341
Enable: true,
342342
EnableDNSEnumeration: true,
343-
IPAddresses: []string{"10.11.12.13", "10.0.0.1-254"},
344-
DomainNames: []string{"example.com", "prod.hosting.com"},
343+
Hosts: []string{"example.com", "prod.hosting.com", "10.11.12.13", "10.0.0.*"},
345344
IncludeOnly: []models.AttackSurfaceIncludeOnly{
346345
{
347-
DomainNames: []string{"live.prod.hosting.com"},
346+
Hosts: []string{"live.prod.hosting.com"},
348347
HTTP: &models.HTTPAttackSurfaceIncludeOnly{
349-
Paths: []string{"/main", "/api/**/create"},
348+
Methods: []string{"GET", "POST"},
349+
Paths: []string{"/main", "/api/**/create"},
350350
},
351351
},
352352
},
@@ -357,15 +357,15 @@ func TestMergeConfigFiles(t *testing.T) {
357357
},
358358
},
359359
{
360-
DomainNames: []string{"jira.example.com", "*.testing.example.com"},
360+
Hosts: []string{"jira.example.com", "*.testing.example.com"},
361361
},
362362
{
363-
IPAddresses: []string{"100.110.120.130"},
363+
Hosts: []string{"100.110.120.130"},
364364
TransportProtocols: []string{"tcp"},
365365
Ports: []string{"22", "8080", "9990-9999"},
366366
},
367367
{
368-
DomainNames: []string{"dev.*", "staging.*"},
368+
Hosts: []string{"dev.*", "staging.*"},
369369
HTTP: &models.HTTPAttackSurfaceIgnore{
370370
Paths: []string{"/auth"},
371371
Methods: []string{"POST"},
@@ -383,13 +383,13 @@ func TestMergeConfigFiles(t *testing.T) {
383383
AttackSurface: &models.AttackSurface{
384384
Enable: true,
385385
EnableDNSEnumeration: true,
386-
IPAddresses: []string{"10.11.12.13", "10.0.0.1-254"},
387-
DomainNames: []string{"example.com", "prod.hosting.com"},
386+
Hosts: []string{"example.com", "prod.hosting.com", "10.11.12.13", "10.0.0.*"},
388387
IncludeOnly: []models.AttackSurfaceIncludeOnly{
389388
{
390-
DomainNames: []string{"live.prod.hosting.com"},
389+
Hosts: []string{"live.prod.hosting.com"},
391390
HTTP: &models.HTTPAttackSurfaceIncludeOnly{
392-
Paths: []string{"/main", "/api/**/create"},
391+
Methods: []string{"GET", "POST"},
392+
Paths: []string{"/main", "/api/**/create"},
393393
},
394394
},
395395
},
@@ -400,15 +400,15 @@ func TestMergeConfigFiles(t *testing.T) {
400400
},
401401
},
402402
{
403-
DomainNames: []string{"jira.example.com", "*.testing.example.com"},
403+
Hosts: []string{"jira.example.com", "*.testing.example.com"},
404404
},
405405
{
406-
IPAddresses: []string{"100.110.120.130"},
406+
Hosts: []string{"100.110.120.130"},
407407
TransportProtocols: []string{"tcp"},
408408
Ports: []string{"22", "8080", "9990-9999"},
409409
},
410410
{
411-
DomainNames: []string{"dev.*", "staging.*"},
411+
Hosts: []string{"dev.*", "staging.*"},
412412
HTTP: &models.HTTPAttackSurfaceIgnore{
413413
Paths: []string{"/auth"},
414414
Methods: []string{"POST"},

0 commit comments

Comments
 (0)