Skip to content
Open
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
83 changes: 67 additions & 16 deletions handwritten/storage/system-test/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,20 @@ describe('storage', function () {
);
});

it('should get access controls', async () => {
/**
* TODO: Re-enable once the test environment is configured without uniform bucket-level access.
* Currently disabled because uniform bucket-level access disables ACLs.
*/
Comment thread
thiyaguk09 marked this conversation as resolved.
it.skip('should get access controls', async () => {
const accessControls = await bucket.acl.get();
assert(Array.isArray(accessControls));
});

it('should add entity to default access controls', async () => {
/**
* TODO: Re-enable once the test environment is configured without uniform bucket-level access.
* Currently disabled because uniform bucket-level access disables ACLs.
*/
it.skip('should add entity to default access controls', async () => {
const [accessControl] = await bucket.acl.default.add({
entity: USER_ACCOUNT,
role: storage.acl.OWNER_ROLE,
Expand All @@ -255,12 +263,20 @@ describe('storage', function () {
await bucket.acl.default.delete({entity: USER_ACCOUNT});
});

it('should get default access controls', async () => {
/**
* TODO: Re-enable once the test environment is configured without uniform bucket-level access.
* Currently disabled because uniform bucket-level access disables ACLs.
*/
it.skip('should get default access controls', async () => {
const accessControls = await bucket.acl.default.get();
assert(Array.isArray(accessControls));
});

it('should grant an account access', async () => {
/**
* TODO: Re-enable once the test environment is configured without uniform bucket-level access.
* Currently disabled because uniform bucket-level access disables ACLs.
*/
it.skip('should grant an account access', async () => {
const [accessControl] = await bucket.acl.add({
entity: USER_ACCOUNT,
role: storage.acl.OWNER_ROLE,
Expand All @@ -275,7 +291,11 @@ describe('storage', function () {
await bucket.acl.delete(opts);
});

it('should update an account', async () => {
/**
* TODO: Re-enable once the test environment is configured without uniform bucket-level access.
* Currently disabled because uniform bucket-level access disables ACLs.
*/
it.skip('should update an account', async () => {
const [accessControl] = await bucket.acl.add({
entity: USER_ACCOUNT,
role: storage.acl.OWNER_ROLE,
Expand Down Expand Up @@ -350,7 +370,11 @@ describe('storage', function () {
}
});

it('should make files private', async () => {
/**
* TODO: Re-enable once the test environment is configured without uniform bucket-level access.
* Currently disabled because uniform bucket-level access disables ACLs.
*/
it.skip('should make files private', async () => {
await Promise.all(
['a', 'b', 'c'].map(text => createFileWithContentPromise(text)),
);
Expand Down Expand Up @@ -381,7 +405,11 @@ describe('storage', function () {
await file.delete();
});

it('should get access controls', async () => {
/**
* TODO: Re-enable once the test environment is configured without uniform bucket-level access.
* Currently disabled because uniform bucket-level access disables ACLs.
*/
it.skip('should get access controls', async () => {
const [accessControls] = await file.acl.get();
assert(Array.isArray(accessControls));
});
Expand All @@ -391,7 +419,11 @@ describe('storage', function () {
assert.strictEqual(typeof (file as any).default, 'undefined');
});

it('should grant an account access', async () => {
/**
* TODO: Re-enable once the test environment is configured without uniform bucket-level access.
* Currently disabled because uniform bucket-level access disables ACLs.
*/
it.skip('should grant an account access', async () => {
const [accessControl] = await file.acl.add({
entity: USER_ACCOUNT,
role: storage.acl.OWNER_ROLE,
Expand All @@ -405,7 +437,11 @@ describe('storage', function () {
await file.acl.delete({entity: USER_ACCOUNT});
});

it('should update an account', async () => {
/**
* TODO: Re-enable once the test environment is configured without uniform bucket-level access.
* Currently disabled because uniform bucket-level access disables ACLs.
*/
it.skip('should update an account', async () => {
const [accessControl] = await file.acl.add({
entity: USER_ACCOUNT,
role: storage.acl.OWNER_ROLE,
Expand Down Expand Up @@ -434,7 +470,11 @@ describe('storage', function () {
await file.acl.delete({entity: 'allUsers'});
});

it('should make a file private', async () => {
/**
* TODO: Re-enable once the test environment is configured without uniform bucket-level access.
* Currently disabled because uniform bucket-level access disables ACLs.
*/
it.skip('should make a file private', async () => {
const validateMakeFilePrivateRejects = (err: ApiError) => {
assert.strictEqual(err.code, 404);
assert.strictEqual(err!.errors![0].reason, 'notFound');
Expand Down Expand Up @@ -507,7 +547,11 @@ describe('storage', function () {
});
});

it('should make a file private from a resumable upload', async () => {
/**
* TODO: Re-enable once the test environment is configured without uniform bucket-level access.
* Currently disabled because uniform bucket-level access disables ACLs.
*/
it.skip('should make a file private from a resumable upload', async () => {
const validateMakeFilePrivateRejects = (err: ApiError) => {
assert.strictEqual((err as ApiError)!.code, 404);
assert.strictEqual((err as ApiError).errors![0].reason, 'notFound');
Expand Down Expand Up @@ -1159,7 +1203,11 @@ describe('storage', function () {
describe('preserves bucket/file ACL over uniform bucket-level access on/off', () => {
beforeEach(createBucket);

it('should preserve default bucket ACL', async () => {
/**
* TODO: Re-enable once the test environment is configured without uniform bucket-level access.
* Currently disabled because uniform bucket-level access disables ACLs.
*/
it.skip('should preserve default bucket ACL', async () => {
await bucket.acl.default.update(customAcl);
const [aclBefore] = await bucket.acl.default.get();

Expand All @@ -1178,7 +1226,11 @@ describe('storage', function () {
}
}).timeout(UNIFORM_ACCESS_TIMEOUT);

it('should preserve file ACL', async () => {
/**
* TODO: Re-enable once the test environment is configured without uniform bucket-level access.
* Currently disabled because uniform bucket-level access disables ACLs.
*/
it.skip('should preserve file ACL', async () => {
const file = bucket.file(`file-${crypto.randomUUID()}`);
await file.save('data', {resumable: false});

Expand Down Expand Up @@ -3140,9 +3192,8 @@ describe('storage', function () {
});

/**
* TODO: Re-enable once the test environment allows public IAM roles.
* Currently disabled to avoid 403 errors when adding 'allUsers' or
* 'allAuthenticatedUsers' permissions.
* TODO: Re-enable once the test environment is configured without uniform bucket-level access.
* Currently disabled because uniform bucket-level access disables ACLs.
*/
it.skip('should respect predefined Acl at file#copy', async () => {
const opts = {destination: 'CloudLogo'};
Expand Down
Loading