Skip to content

Commit 8783f0b

Browse files
committed
CR changes - add assert to the bucket name (not only length)
Signed-off-by: shirady <[email protected]>
1 parent 9ad3eef commit 8783f0b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/test/unit_tests/test_bucketspace_fs.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,11 +468,13 @@ mocha.describe('bucketspace_fs', function() {
468468
const dummy_object_sdk_for_iam_account = make_dummy_object_sdk_for_account(dummy_object_sdk, account_iam_user1);
469469
const res = await bucketspace_fs.list_buckets(dummy_object_sdk_for_iam_account);
470470
assert.equal(res.buckets.length, 1);
471+
assert.equal(res.buckets[0].name.unwrap(), test_bucket);
471472

472473
// account_iam_user2 can list the created bucket (the implicit policy - same root account)
473474
const dummy_object_sdk_for_iam_account2 = make_dummy_object_sdk_for_account(dummy_object_sdk, account_iam_user2);
474475
const res2 = await bucketspace_fs.list_buckets(dummy_object_sdk_for_iam_account2);
475476
assert.equal(res2.buckets.length, 1);
477+
assert.equal(res2.buckets[0].name.unwrap(), test_bucket);
476478
});
477479
mocha.it('list buckets - different account', async function() {
478480
// another user created a bucket (account_user3 cannot list it)
@@ -489,6 +491,7 @@ mocha.describe('bucketspace_fs', function() {
489491
const dummy_object_sdk_for_iam_account = make_dummy_object_sdk_for_account(dummy_object_sdk, account_user4);
490492
const res = await bucketspace_fs.list_buckets(dummy_object_sdk_for_iam_account);
491493
assert.equal(res.buckets.length, 1);
494+
assert.equal(res.buckets[0].name.unwrap(), test_bucket);
492495
});
493496
mocha.it('list buckets - different account with bucket policy (principal by id)', async function() {
494497
// another user created a bucket
@@ -499,6 +502,7 @@ mocha.describe('bucketspace_fs', function() {
499502
const dummy_object_sdk_for_iam_account = make_dummy_object_sdk_for_account(dummy_object_sdk, account_user4);
500503
const res = await bucketspace_fs.list_buckets(dummy_object_sdk_for_iam_account);
501504
assert.equal(res.buckets.length, 1);
505+
assert.equal(res.buckets[0].name.unwrap(), test_bucket);
502506
});
503507
mocha.afterEach(async function() {
504508
await fs_utils.folder_delete(`${new_buckets_path}/${test_bucket}`);

0 commit comments

Comments
 (0)