container: implement SignedDataSource on DeleteRequest message

This commit is contained in:
Leonard Lyubich 2020-05-11 15:01:29 +03:00
parent 2d53ebf9c4
commit eedb97d135
4 changed files with 68 additions and 1 deletions

View file

@ -22,7 +22,7 @@ func TestRequestSign(t *testing.T) {
constructor func() sigType
payloadCorrupt []func(sigType)
}{
{ // Request
{ // PutRequest
constructor: func() sigType {
return new(PutRequest)
},
@ -63,6 +63,21 @@ func TestRequestSign(t *testing.T) {
},
},
},
{ // DeleteRequest
constructor: func() sigType {
return new(DeleteRequest)
},
payloadCorrupt: []func(sigType){
func(s sigType) {
req := s.(*DeleteRequest)
cid := req.GetCID()
cid[0]++
req.SetCID(cid)
},
},
},
}
for _, item := range items {