Skip to content

Commit 4cc242f

Browse files
committed
fix test
1 parent fe8b9cb commit 4cc242f

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

internal/datasource/config/nginx_config_parser.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ func (ncp *NginxConfigParser) createNginxConfigContext(
175175
}
176176
case "app_protect_security_log":
177177
if len(directive.Args) > 1 {
178-
slog.Info("args", "", directive.Args)
179178
sysLogServers := ncp.findValidSysLogServers(directive.Args)
180179
if len(sysLogServers) == 0 {
181180
slog.WarnContext(ctx, "Could not find usable NAP syslog server, "+

internal/datasource/config/nginx_config_parser_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -621,15 +621,15 @@ func TestNginxConfigParser_SyslogServerParse(t *testing.T) {
621621
expectedSyslogServers: "",
622622
content: testconfig.NginxConfigWithMultipleSysLogs(errorLog.Name(), accessLog.Name(),
623623
"random.domain:1515", "192.168.12.34:1517", "my.domain.com:1517"),
624-
expectedLog: "Could not find valid Nap Syslog server",
624+
expectedLog: "Could not find usable NAP syslog server, security violations will be unavailable",
625625
portInUse: false,
626626
},
627627
{
628628
name: "Test 3: Port unavailable, use next valid sever",
629629
expectedSyslogServers: "localhost:1516",
630630
content: testconfig.NginxConfigWithMultipleSysLogs(errorLog.Name(), accessLog.Name(),
631631
"192.168.12.34:1517", "127.0.0.1:1515", "localhost:1516"),
632-
expectedLog: "NAP syslog server is not reachable",
632+
expectedLog: "\"Found valid NAP syslog server\" address=localhost:1516",
633633
portInUse: true,
634634
},
635635
{

0 commit comments

Comments
 (0)