From 55b75a0dae7dfa1ab610b1f9af70d5ec0db8d324 Mon Sep 17 00:00:00 2001 From: alexvanin Date: Thu, 2 Apr 2020 15:05:48 +0300 Subject: [PATCH] object: Add test for object request type --- object/service_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/object/service_test.go b/object/service_test.go index f06e557..46213e2 100644 --- a/object/service_test.go +++ b/object/service_test.go @@ -18,11 +18,22 @@ func TestRequest(t *testing.T) { &GetRangeHashRequest{}, } + types := []RequestType{ + RequestPut, + RequestGet, + RequestHead, + RequestSearch, + RequestDelete, + RequestRange, + RequestRangeHash, + } + for i := range cases { v := cases[i] t.Run(fmt.Sprintf("%T", v), func(t *testing.T) { require.NotPanics(t, func() { v.CID() }) + require.Equal(t, types[i], v.Type()) }) } }