forked from TrueCloudLab/frostfs-api-go
added test case for exists object in put request
This commit is contained in:
parent
d499971218
commit
acfb16d363
2 changed files with 10 additions and 7 deletions
|
@ -125,13 +125,14 @@ func (m *GetResponse) NotFull() bool { return checkIsNotFull(m) }
|
|||
func (m *PutRequest) NotFull() bool { return checkIsNotFull(m) }
|
||||
|
||||
// CID returns container id value from object put request.
|
||||
func (m *PutRequest) CID() CID {
|
||||
if header := m.GetHeader(); header != nil {
|
||||
if obj := header.GetObject(); obj != nil {
|
||||
return obj.SystemHeader.CID
|
||||
}
|
||||
func (m *PutRequest) CID() (cid CID) {
|
||||
if header := m.GetHeader(); header == nil {
|
||||
return
|
||||
} else if obj := header.GetObject(); obj == nil {
|
||||
return
|
||||
} else {
|
||||
return obj.SystemHeader.CID
|
||||
}
|
||||
return refs.CID{}
|
||||
}
|
||||
|
||||
// CID returns container id value from object get request.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue