Skip to content

Commit 3159db9

Browse files
committed
CR fixes
Signed-off-by: Romy <[email protected]>
1 parent 36e84fd commit 3159db9

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

src/cmd/manage_nsfs.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ async function fetch_bucket_data(action, user_input) {
9696
// added undefined values to keep the order the properties when printing the data object
9797
_id: undefined,
9898
name: user_input.name === undefined ? undefined : String(user_input.name),
99+
owner_account: undefined,
99100
tag: undefined, // if we would add the option to tag a bucket using CLI, this should be changed
100101
versioning: action === ACTIONS.ADD ? 'DISABLED' : undefined,
101102
creation_date: action === ACTIONS.ADD ? new Date().toISOString() : undefined,

src/manage_nsfs/manage_nsfs_cli_utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function write_stdout_response(response_code, detail, event_arg) {
3737
* get_bucket_owner_account will return the account of the bucket_owner
3838
* otherwise it would throw an error
3939
* @param {import('../sdk/config_fs').ConfigFS} config_fs
40-
* @param {string} bucket_owner
40+
* @param {string} [bucket_owner]
4141
* @param {string} [owner_account_id]
4242
*/
4343
async function get_bucket_owner_account(config_fs, bucket_owner, owner_account_id) {

src/sdk/bucketspace_fs.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@ const util = require('util');
1515
const bucket_policy_utils = require('../endpoint/s3/s3_bucket_policy_utils');
1616
const nsfs_schema_utils = require('../manage_nsfs/nsfs_schema_utils');
1717
const nc_mkm = require('../manage_nsfs/nc_master_key_manager').get_instance();
18-
const { ConfigFS, JSON_SUFFIX } = require('./config_fs');
18+
const { ConfigFS, JSON_SUFFIX, CONFIG_TYPES } = require('./config_fs');
1919
const mongo_utils = require('../util/mongo_utils');
20-
const { TYPES } = require('../manage_nsfs/manage_nsfs_constants');
2120

2221
const KeysSemaphore = require('../util/keys_semaphore');
2322
const { get_umasked_mode, validate_bucket_creation, get_bucket_tmpdir_full_path, folder_delete,
@@ -125,7 +124,7 @@ class BucketSpaceFS extends BucketSpaceSimpleFS {
125124
// Backward compatibility will take longer without bucket owner name
126125
const account_config = await this.config_fs.get_identity_by_id(
127126
bucket.owner_account,
128-
TYPES.ACCOUNT,
127+
CONFIG_TYPES.ACCOUNT,
129128
{ silent_if_missing: true }
130129
);
131130

src/test/unit_tests/jest_tests/test_config_fs.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ describe('adjust_bucket_with_schema_updates', () => {
2121
expect(bucket).toBeUndefined();
2222
});
2323

24-
it('should return bucket without deprecated properties (system_owner)', () => {
24+
it('should return bucket without deprecated properties', () => {
2525
const bucket = {name: 'bucket1', system_owner: 'account1-system-owner', bucket_owner: 'account1-bucket_owner'};
2626
config_fs.adjust_bucket_with_schema_updates(bucket);
2727
expect(bucket).toBeDefined();

src/test/unit_tests/test_bucketspace.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,8 @@ mocha.describe('bucket operations - namespace_fs', function() {
373373
const s3_bucket = bucket_name + '-s3';
374374
const res = await s3_correct_uid_default_nsr.getBucketAcl({ Bucket: s3_bucket });
375375
const bucket_info = await rpc_client.bucket.read_bucket({ name: s3_bucket });
376-
assert.equal(res.Owner.ID, bucket_info.owner_account.id);
377376
assert.equal(res.Owner.DisplayName, bucket_info.owner_account.email);
377+
assert.equal(res.Owner.ID, bucket_info.owner_account.id);
378378
});
379379
mocha.it('create s3 bucket with correct distinguished name', async function() {
380380
const account_s3_correct_dn = await rpc_client.account.create_account({

0 commit comments

Comments
 (0)