From 4c77b5ef9b61a3d3d9d98aff51732b16e360382a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Fri, 26 Aug 2022 12:21:35 +0200 Subject: [PATCH] Use unprivileged port for ports test --- honeypot/ports/server_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/honeypot/ports/server_test.go b/honeypot/ports/server_test.go index a741c2b..2fb032f 100644 --- a/honeypot/ports/server_test.go +++ b/honeypot/ports/server_test.go @@ -18,11 +18,12 @@ func TestServer(t *testing.T) { server := ports.New(store) server.IP = "127.0.0.1" - server.AddTCPPort("25") + server.AddTCPPort("2555") go server.Start(ctx) + time.Sleep(1 * time.Second) - rAddr, err := net.ResolveTCPAddr("tcp", net.JoinHostPort(server.IP, "25")) + rAddr, err := net.ResolveTCPAddr("tcp", net.JoinHostPort(server.IP, "2555")) if err != nil { t.Fatalf("Error resolving remote address: %s", err) }