mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-04-26 21:05:30 +00:00
add tests for invalid addr to net servers
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user