grpc client/server fixes (#1355)

* grpc client/server fixes

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2020-03-17 14:27:20 +03:00
committed by GitHub
parent 03031a694d
commit ab73127063
7 changed files with 63 additions and 41 deletions

View File

@@ -1,10 +1,26 @@
package errors
import (
er "errors"
"net/http"
"testing"
)
func TestEqual(t *testing.T) {
err1 := NotFound("myid1", "msg1")
err2 := NotFound("myid2", "msg2")
if !Equal(err1, err2) {
t.Fatal("errors must be equal")
}
err3 := er.New("my test err")
if Equal(err1, err3) {
t.Fatal("errors must be not equal")
}
}
func TestErrors(t *testing.T) {
testData := []*Error{
{