object: implement signing payload methods on SearchRequest message

This commit is contained in:
Leonard Lyubich 2020-05-06 15:09:31 +03:00
parent 84671cd4aa
commit 4aac4d093d
2 changed files with 54 additions and 10 deletions

View file

@ -136,6 +136,24 @@ func TestSignVerifyRequests(t *testing.T) {
},
},
},
{ // GetRangeHashRequest
constructor: func() sigType {
return &SearchRequest{
Query: []byte{1, 2, 3},
}
},
payloadCorrupt: []func(sigType){
func(s sigType) {
s.(*SearchRequest).ContainerID[0]++
},
func(s sigType) {
s.(*SearchRequest).Query[0]++
},
func(s sigType) {
s.(*SearchRequest).QueryVersion++
},
},
},
}
for _, item := range items {