From 9f2a2abe42a6211df6970ba7625d245298778a38 Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Fri, 13 May 2022 12:35:41 +0100 Subject: [PATCH] [bugfix] update syslog tests to listen/connect specifically to ipv4 loopback (#561) Signed-off-by: kim --- internal/log/syslog_test.go | 2 +- testrig/log.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/log/syslog_test.go b/internal/log/syslog_test.go index 2b0d33667..6507afa52 100644 --- a/internal/log/syslog_test.go +++ b/internal/log/syslog_test.go @@ -47,7 +47,7 @@ func (suite *SyslogTestSuite) SetupTest() { viper.Set(config.Keys.SyslogEnabled, true) viper.Set(config.Keys.SyslogProtocol, "udp") - viper.Set(config.Keys.SyslogAddress, "localhost:42069") + viper.Set(config.Keys.SyslogAddress, "127.0.0.1:42069") server, channel, err := testrig.InitTestSyslog() if err != nil { panic(err) diff --git a/testrig/log.go b/testrig/log.go index 68d548260..1dbba83b5 100644 --- a/testrig/log.go +++ b/testrig/log.go @@ -43,7 +43,7 @@ func InitTestSyslog() (*syslog.Server, chan format.LogParts, error) { server.SetFormat(syslog.Automatic) server.SetHandler(handler) - if err := server.ListenUDP("localhost:42069"); err != nil { + if err := server.ListenUDP("127.0.0.1:42069"); err != nil { return nil, nil, err }