-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
In many Delete* calls, a response is checked as
if reflect.TypeOf(response) != reflect.TypeOf(tt.out) {
t.Error("response: expected", reflect.TypeOf(tt.out), "received", reflect.TypeOf(response))
}However, this check does not make much sense. response is returned from a Delete* client function call, which has a concrete type *emptypb.Empty. Any other type cannot be returned from there, since Go is a statically typed language.
Then response is compared against an expectation referred also as *emptypb.Empty. Thus, we just compare that response's type *emptypb.Empty is equal to out's type *emptypb.Empty. The result is always true.
Also, emptypb.Empty represents an empty message in gRPC. It does not have any exported fields, and we do not have anything to check there.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels