diff --git a/internal/module/test/tcp-server_test.go b/internal/module/test/tcp-server_test.go index 2360a28..c2b22f4 100644 --- a/internal/module/test/tcp-server_test.go +++ b/internal/module/test/tcp-server_test.go @@ -88,6 +88,15 @@ func TestBadTCPServer(t *testing.T) { }, errorString: "net.tcp.server ip must be a string", }, + { + name: "invalid addr", + params: map[string]any{ + "ip": "127.0.0.", + "port": 8000.0, + "framing": "LF", + }, + errorString: "lookup 127.0.0.: no such host", + }, } for _, test := range tests { diff --git a/internal/module/test/udp-multicast_test.go b/internal/module/test/udp-multicast_test.go index 937a018..686fcd6 100644 --- a/internal/module/test/udp-multicast_test.go +++ b/internal/module/test/udp-multicast_test.go @@ -71,6 +71,14 @@ func TestBadUDPMulticast(t *testing.T) { }, errorString: "net.udp.multicast ip must be a string", }, + { + name: "invalid addr", + params: map[string]any{ + "ip": "127.0.0.", + "port": 8000.0, + }, + errorString: "lookup 127.0.0.: no such host", + }, } for _, test := range tests { diff --git a/internal/module/test/udp-server_test.go b/internal/module/test/udp-server_test.go index 5e35329..ccad2b6 100644 --- a/internal/module/test/udp-server_test.go +++ b/internal/module/test/udp-server_test.go @@ -68,6 +68,14 @@ func TestBadUDPServer(t *testing.T) { }, errorString: "net.udp.server bufferSize must be a number", }, + { + name: "invalid addr", + params: map[string]any{ + "ip": "127.0.0.", + "port": 8000.0, + }, + errorString: "lookup 127.0.0.: no such host", + }, } for _, test := range tests {