Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INTEGRATION [PR#1634 > development/8.1] improvement: ARSN-42 get/set ObjectMD.nullUploadId #1638

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions lib/models/ObjectMD.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ class ObjectMD {
// should be undefined when not set explicitly
'isNull': undefined,
'nullVersionId': undefined,
'nullUploadId': undefined,
'isDeleteMarker': undefined,
'versionId': undefined,
'uploadId': undefined,
Expand Down Expand Up @@ -710,6 +711,27 @@ class ObjectMD {
return this._data.nullVersionId;
}

/**
* Set metadata nullUploadId value
*
* @param {string} nullUploadId - The upload ID used to complete
* the MPU of the null version
* @return {ObjectMD} itself
*/
setNullUploadId(nullUploadId) {
this._data.nullUploadId = nullUploadId;
return this;
}

/**
* Get metadata nullUploadId value
*
* @return {string|undefined} The object nullUploadId
*/
getNullUploadId() {
return this._data.nullUploadId;
}

/**
* Set metadata isDeleteMarker value
*
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"engines": {
"node": ">=8"
},
"version": "8.1.11",
"version": "8.1.14",
"description": "Common utilities for the S3 project components",
"main": "index.js",
"repository": {
Expand Down
3 changes: 3 additions & 0 deletions tests/unit/models/ObjectMD.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ describe('ObjectMD class setters/getters', () => {
['IsNull', true],
['NullVersionId', null, undefined],
['NullVersionId', '111111'],
['NullUploadId', null, undefined],
['NullUploadId', 'abcdefghi'],
['IsDeleteMarker', null, false],
['IsDeleteMarker', true],
['VersionId', null, undefined],
Expand Down Expand Up @@ -421,6 +423,7 @@ describe('getAttributes static method', () => {
'azureInfo': true,
'isNull': true,
'nullVersionId': true,
'nullUploadId': true,
'isDeleteMarker': true,
'versionId': true,
'tags': true,
Expand Down