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#1521 > development/8.1] ARSN-5: add BucketInfo field UID #1522

Merged
merged 2 commits into from
Jul 28, 2021
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
11 changes: 10 additions & 1 deletion lib/models/BucketInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const NotificationConfiguration = require('./NotificationConfiguration');
// WHEN UPDATING THIS NUMBER, UPDATE BucketInfoModelVersion.md CHANGELOG
// BucketInfoModelVersion.md can be found in documentation/ at the root
// of this repository
const modelVersion = 9;
const modelVersion = 14;

class BucketInfo {
/**
Expand Down Expand Up @@ -663,6 +663,15 @@ class BucketInfo {
getUid() {
return this._uid;
}
/**
* Set unique id of bucket.
* @param {string} uid - unique identifier for the bucket
* @return {BucketInfo} - bucket info instance
*/
setUid(uid) {
this._uid = uid;
return this;
}
/**
* Check if the bucket is an NFS bucket.
* @return {boolean} - Wether the bucket is NFS or not
Expand Down
6 changes: 6 additions & 0 deletions tests/unit/models/BucketInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,12 @@ Object.keys(acl).forEach(
assert.deepStrictEqual(
dummyBucket.getNotificationConfiguration(), newNotifConfig);
});
it('setUid should set bucket uid', () => {
const testUid = '7751ec04-da87-44a1-99b4-95ebb345d40e';
dummyBucket.setUid(testUid);
assert.deepStrictEqual(
dummyBucket.getUid(), testUid);
});
});
})
);
Expand Down