github.com/streamdal/segmentio-kafka-go@v0.4.47-streamdal/protocol/describeuserscramcredentials/describeuserscramcredentials_test.go (about) 1 package describeuserscramcredentials_test 2 3 import ( 4 "testing" 5 6 "github.com/segmentio/kafka-go/protocol/describeuserscramcredentials" 7 "github.com/segmentio/kafka-go/protocol/prototest" 8 ) 9 10 const ( 11 v0 = 0 12 ) 13 14 func TestDescribeUserScramCredentialsRequest(t *testing.T) { 15 prototest.TestRequest(t, v0, &describeuserscramcredentials.Request{ 16 Users: []describeuserscramcredentials.RequestUser{ 17 { 18 Name: "foo-1", 19 }, 20 }, 21 }) 22 } 23 24 func TestDescribeUserScramCredentialsResponse(t *testing.T) { 25 prototest.TestResponse(t, v0, &describeuserscramcredentials.Response{ 26 ThrottleTimeMs: 500, 27 Results: []describeuserscramcredentials.ResponseResult{ 28 { 29 User: "foo", 30 ErrorCode: 1, 31 ErrorMessage: "foo-error", 32 CredentialInfos: []describeuserscramcredentials.CredentialInfo{ 33 { 34 Mechanism: 2, 35 Iterations: 15000, 36 }, 37 }, 38 }, 39 }, 40 }) 41 }