From d9d4c9200fd12ad16676405cad7c3c33c1915a67 Mon Sep 17 00:00:00 2001 From: Hu Shuai Date: Mon, 23 Mar 2020 17:54:07 +0800 Subject: [PATCH] test: add unit test case for func ConstructRangeStr Signed-off-by: Hu Shuai --- pkg/httputils/http_util_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/httputils/http_util_test.go b/pkg/httputils/http_util_test.go index ce5727ff4..21731f1b1 100644 --- a/pkg/httputils/http_util_test.go +++ b/pkg/httputils/http_util_test.go @@ -234,6 +234,10 @@ func (s *HTTPUtilTestSuite) TestConcurrencyPostJson(c *check.C) { wg.Wait() } +func (s *HTTPUtilTestSuite) TestConstructRangeStr(c *check.C) { + c.Check(ConstructRangeStr("200-1000"), check.DeepEquals, "bytes=200-1000") +} + // ---------------------------------------------------------------------------- // helper functions and structures