github.com/segmentio/kafka-go@v0.4.48-0.20240318174348-3f6244eb34fd/protocol/deletegroups/deletegroups_test.go (about) 1 package deletegroups_test 2 3 import ( 4 "testing" 5 6 "github.com/segmentio/kafka-go/protocol/deletegroups" 7 "github.com/segmentio/kafka-go/protocol/prototest" 8 ) 9 10 func TestDeleteGroupsRequest(t *testing.T) { 11 for _, version := range []int16{0, 1, 2} { 12 prototest.TestRequest(t, version, &deletegroups.Request{ 13 GroupIDs: []string{"group1", "group2"}, 14 }) 15 } 16 } 17 18 func TestDeleteGroupsResponse(t *testing.T) { 19 for _, version := range []int16{0, 1, 2} { 20 prototest.TestResponse(t, version, &deletegroups.Response{ 21 Responses: []deletegroups.ResponseGroup{ 22 { 23 GroupID: "group1", 24 ErrorCode: 0, 25 }, 26 { 27 GroupID: "group2", 28 ErrorCode: 1, 29 }, 30 }, 31 }) 32 } 33 }