From 757c6b7e30e3fc8018d5a4de72f244772b683efb Mon Sep 17 00:00:00 2001 From: hanbing0715 Date: Thu, 13 Apr 2017 10:39:42 +0800 Subject: [PATCH] add test for apiversions api --- broker_test.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/broker_test.go b/broker_test.go index 5adb46f105..fcbe627fa9 100644 --- a/broker_test.go +++ b/broker_test.go @@ -284,6 +284,19 @@ var brokerTestTable = []struct { t.Error("DescribeGroups request got no response!") } }}, + + {"ApiVersionsRequest", + []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + func(t *testing.T, broker *Broker) { + request := ApiVersionsRequest{} + response, err := broker.ApiVersions(&request) + if err != nil { + t.Error(err) + } + if response == nil { + t.Error("ApiVersions request got no response!") + } + }}, } func validateBrokerMetrics(t *testing.T, broker *Broker, mockBrokerMetrics brokerMetrics) {