-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8192 from shirady/nsfs-nc-system-owner
NC | NSFS | Stop Setting `system_owner` in Bucket Config
- Loading branch information
Showing
14 changed files
with
89 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* Copyright (C) 2024 NooBaa */ | ||
'use strict'; | ||
|
||
const path = require('path'); | ||
const config = require('../../../../config'); | ||
const { TMP_PATH } = require('../../system_tests/test_utils'); | ||
const { get_process_fs_context } = require('../../../util/native_fs_utils'); | ||
const { ConfigFS } = require('../../../sdk/config_fs'); | ||
|
||
const tmp_fs_path = path.join(TMP_PATH, 'test_config_fs'); | ||
const config_root = path.join(tmp_fs_path, 'config_root'); | ||
const config_root_backend = config.NSFS_NC_CONFIG_DIR_BACKEND; | ||
const fs_context = get_process_fs_context(config_root_backend); | ||
|
||
const config_fs = new ConfigFS(config_root, config_root_backend, fs_context); | ||
|
||
describe('adjust_bucket_with_schema_updates', () => { | ||
it('should return undefined on undefined bucket', () => { | ||
const bucket = undefined; | ||
config_fs.adjust_bucket_with_schema_updates(bucket); | ||
expect(bucket).toBeUndefined(); | ||
}); | ||
|
||
it('should return bucket without deprecated properties (system_owner)', () => { | ||
const bucket = {name: 'bucket1', system_owner: 'account1-system-owner'}; | ||
config_fs.adjust_bucket_with_schema_updates(bucket); | ||
expect(bucket).toBeDefined(); | ||
expect(bucket).not.toHaveProperty('system_owner'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters