forked from TrueCloudLab/frostfs-api-go
object: Add test for object request type
This commit is contained in:
parent
1e513625f1
commit
55b75a0dae
1 changed files with 11 additions and 0 deletions
|
@ -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())
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue