sasl_authenticate_response_test.go 448 B

123456789101112131415161718192021
  1. package sarama
  2. import "testing"
  3. var (
  4. saslAuthenticatResponseErr = []byte{
  5. 0, 58,
  6. 0, 3, 'e', 'r', 'r',
  7. 0, 0, 0, 3, 'm', 's', 'g',
  8. }
  9. )
  10. func TestSaslAuthenticateResponse(t *testing.T) {
  11. response := new(SaslAuthenticateResponse)
  12. response.Err = ErrSASLAuthenticationFailed
  13. msg := "err"
  14. response.ErrorMessage = &msg
  15. response.SaslAuthBytes = []byte(`msg`)
  16. testResponse(t, "authenticate reponse", response, saslAuthenticatResponseErr)
  17. }