Skip to content

Commit

Permalink
Update cli tests to check for message in account and bucket
Browse files Browse the repository at this point in the history
Signed-off-by: Aayush Chouhan <[email protected]>
  • Loading branch information
achouhan09 committed Jan 29, 2025
1 parent 784ebd8 commit 390d2b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1512,6 +1512,8 @@ describe('manage nsfs cli account flow', () => {
const res = await exec_manage_cli(type, action, account_options);
const res_json = JSON.parse(res.trim());
expect(res_json.response.code).toBe(ManageCLIResponse.AccountDeleted.code);
const message = `Account ${name} has been successfully deleted.`;
expect(res_json.response.message).toBe(message);
const account_by_name_exists = await config_fs.is_account_exists_by_name(name);
expect(account_by_name_exists).toBe(false);
const account_by_access_key_exists = await config_fs.is_account_exists_by_access_key(defaults.access_key);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,8 @@ describe('manage nsfs cli bucket flow', () => {
const delete_bucket_options = { config_root, name: bucket_defaults.name, force: true};
const resp = await exec_manage_cli(TYPES.BUCKET, ACTIONS.DELETE, delete_bucket_options);
expect(JSON.parse(resp.trim()).response.code).toBe(ManageCLIResponse.BucketDeleted.code);
const message = `Bucket ${bucket_defaults.name} has been successfully deleted.`;
expect(JSON.parse(resp.trim()).response.message).toBe(message);
const is_bucket_exists = await config_fs.is_bucket_exists(bucket_defaults.name);
expect(is_bucket_exists).toBe(false);
});
Expand Down

0 comments on commit 390d2b4

Please sign in to comment.