Commit b031d69c authored by Binh Nguyen's avatar Binh Nguyen Committed by Gerrit Code Review
Browse files

Merge "FAB-10343 TestNewGRPCServerInvalidParameters fix"

parents af6669a6 b8e5e29f
......@@ -358,10 +358,14 @@ func TestNewGRPCServerInvalidParameters(t *testing.T) {
_, err = comm.NewGRPCServer("localhost:1BBB", comm.ServerConfig{
SecOpts: &comm.SecureOptions{UseTLS: false}})
//check for possible errors based on platform and Go release
msgs := [3]string{"listen tcp: lookup tcp/1BBB: nodename nor servname provided, or not known",
"listen tcp: unknown port tcp/1BBB", "listen tcp: address tcp/1BBB: unknown port"}
msgs := []string{
"listen tcp: lookup tcp/1BBB: nodename nor servname provided, or not known",
"listen tcp: unknown port tcp/1BBB",
"listen tcp: address tcp/1BBB: unknown port",
"listen tcp: lookup tcp/1BBB: Servname not supported for ai_socktype",
}
if assert.Error(t, err, fmt.Sprintf("[%s], [%s] or [%s] expected", msgs[0], msgs[1], msgs[2])) {
if assert.Error(t, err, fmt.Sprintf("[%s], [%s] [%s] or [%s] expected", msgs[0], msgs[1], msgs[2], msgs[3])) {
assert.Contains(t, msgs, err.Error())
}
if err != nil {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment