MCPcopy
hub / github.com/IBM/sarama / TestDeleteGroupsResponse

Function TestDeleteGroupsResponse

delete_groups_response_test.go:55–84  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

53)
54
55func TestDeleteGroupsResponse(t *testing.T) {
56 var response *DeleteGroupsResponse
57
58 response = new(DeleteGroupsResponse)
59 testVersionDecodable(t, "empty", response, emptyDeleteGroupsResponse, 0)
60 if response.ThrottleTime != 0 {
61 t.Error("Expected no violation")
62 }
63 if len(response.GroupErrorCodes) != 0 {
64 t.Error("Expected no groups")
65 }
66
67 response = new(DeleteGroupsResponse)
68 testVersionDecodable(t, "error", response, errorDeleteGroupsResponse, 0)
69 if response.ThrottleTime != 0 {
70 t.Error("Expected no violation")
71 }
72 if !errors.Is(response.GroupErrorCodes["foo"], ErrClusterAuthorizationFailed) {
73 t.Error("Expected error ErrClusterAuthorizationFailed, found:", response.GroupErrorCodes["foo"])
74 }
75
76 response = new(DeleteGroupsResponse)
77 testVersionDecodable(t, "no error", response, noErrorDeleteGroupsResponse, 0)
78 if response.ThrottleTime != 0 {
79 t.Error("Expected no violation")
80 }
81 if !errors.Is(response.GroupErrorCodes["foo"], ErrNoError) {
82 t.Error("Expected error ErrClusterAuthorizationFailed, found:", response.GroupErrorCodes["foo"])
83 }
84}
85
86func TestDeleteGroupsResponseV2(t *testing.T) {
87 var response *DeleteGroupsResponse

Callers

nothing calls this directly

Calls 3

testVersionDecodableFunction · 0.85
IsMethod · 0.80
ErrorMethod · 0.65

Tested by

no test coverage detected