Commit b8e5e29f authored by Jason Yellick's avatar Jason Yellick
Browse files

FAB-10343 TestNewGRPCServerInvalidParameters fix



The TestNewGRPCServerInvalidParameters test relies on one of three
particular error strings being returned by the platform to test.  On
some Linux platforms, the error returned is actually none of these
three.  So, this test adds yet another alternative error to this test.

Change-Id: Id6b21daf0943e247456f649998383dadbe140c0e
Signed-off-by: default avatarJason Yellick <jyellick@us.ibm.com>
parent 342fa4bc
......@@ -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