Skip to content
This repository was archived by the owner on Mar 3, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
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
7 changes: 6 additions & 1 deletion samples/system-test/buckets.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,12 @@ it("should add a bucket's website configuration", async () => {
});
});

it('should make bucket publicly readable', async () => {
/**
* TODO: Re-enable once the test environment allows public IAM roles.
* Currently disabled to avoid 403 errors when adding 'allUsers' or
* 'allAuthenticatedUsers' permissions.
*/
it.skip('should make bucket publicly readable', async () => {
const output = execSync(`node makeBucketPublic.js ${bucketName}`);
assert.match(
output,
Expand Down
7 changes: 6 additions & 1 deletion samples/system-test/files.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,12 @@ describe('file', () => {
await bucket.file(publicFileName).delete();
});

it('should make a file public', () => {
/**
* TODO: Re-enable once the test environment allows public IAM roles.
* Currently disabled to avoid 403 errors when adding 'allUsers' or
* 'allAuthenticatedUsers' permissions.
*/
it.skip('should make a file public', () => {
const output = execSync(
`node makePublic.js ${bucketName} ${publicFileName}`
);
Expand Down
63 changes: 54 additions & 9 deletions system-test/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,12 @@ describe('storage', function () {
await bucket.acl.delete({entity: USER_ACCOUNT});
});

it('should make a bucket public', async () => {
/**
* TODO: Re-enable once the test environment allows public IAM roles.
* Currently disabled to avoid 403 errors when adding 'allUsers' or
* 'allAuthenticatedUsers' permissions.
*/
it.skip('should make a bucket public', async () => {
await bucket.makePublic();
const [aclObject] = await bucket.acl.get({entity: 'allUsers'});
assert.deepStrictEqual(aclObject, {
Expand All @@ -302,7 +307,12 @@ describe('storage', function () {
await bucket.acl.delete({entity: 'allUsers'});
});

it('should make files public', async () => {
/**
* TODO: Re-enable once the test environment allows public IAM roles.
* Currently disabled to avoid 403 errors when adding 'allUsers' or
* 'allAuthenticatedUsers' permissions.
*/
it.skip('should make files public', async () => {
await Promise.all(
['a', 'b', 'c'].map(text => createFileWithContentPromise(text))
);
Expand All @@ -319,7 +329,12 @@ describe('storage', function () {
]);
});

it('should make a bucket private', async () => {
/**
* TODO: Re-enable once the test environment allows public IAM roles.
* Currently disabled to avoid 403 errors when adding 'allUsers' or
* 'allAuthenticatedUsers' permissions.
*/
it.skip('should make a bucket private', async () => {
try {
await bucket.makePublic();
await new Promise(resolve =>
Expand Down Expand Up @@ -404,7 +419,12 @@ describe('storage', function () {
await file.acl.delete({entity: USER_ACCOUNT});
});

it('should make a file public', async () => {
/**
* TODO: Re-enable once the test environment allows public IAM roles.
* Currently disabled to avoid 403 errors when adding 'allUsers' or
* 'allAuthenticatedUsers' permissions.
*/
it.skip('should make a file public', async () => {
await file.makePublic();
const [aclObject] = await file.acl.get({entity: 'allUsers'});
assert.deepStrictEqual(aclObject, {
Expand Down Expand Up @@ -452,7 +472,12 @@ describe('storage', function () {
assert.strictEqual(encryptionAlgorithm, 'AES256');
});

it('should make a file public during the upload', async () => {
/**
* TODO: Re-enable once the test environment allows public IAM roles.
* Currently disabled to avoid 403 errors when adding 'allUsers' or
* 'allAuthenticatedUsers' permissions.
*/
it.skip('should make a file public during the upload', async () => {
const [file] = await bucket.upload(FILES.big.path, {
resumable: false,
public: true,
Expand All @@ -465,7 +490,12 @@ describe('storage', function () {
});
});

it('should make a file public from a resumable upload', async () => {
/**
* TODO: Re-enable once the test environment allows public IAM roles.
* Currently disabled to avoid 403 errors when adding 'allUsers' or
* 'allAuthenticatedUsers' permissions.
*/
it.skip('should make a file public from a resumable upload', async () => {
const [file] = await bucket.upload(FILES.big.path, {
resumable: true,
public: true,
Expand Down Expand Up @@ -529,7 +559,12 @@ describe('storage', function () {
]);
});

it('should set a policy', async () => {
/**
* TODO: Re-enable once the test environment allows public IAM roles.
* Currently disabled to avoid 403 errors when adding 'allUsers' or
* 'allAuthenticatedUsers' permissions.
*/
it.skip('should set a policy', async () => {
const [policy] = await bucket.iam.getPolicy();
policy!.bindings.push({
role: 'roles/storage.legacyBucketReader',
Expand Down Expand Up @@ -2305,7 +2340,12 @@ describe('storage', function () {
});
});

it('iam#setPolicy', async () => {
/**
* TODO: Re-enable once the test environment allows public IAM roles.
* Currently disabled to avoid 403 errors when adding 'allUsers' or
* 'allAuthenticatedUsers' permissions.
*/
it.skip('iam#setPolicy', async () => {
await requesterPaysDoubleTest(async options => {
const [policy] = await bucket.iam.getPolicy();

Expand Down Expand Up @@ -3004,7 +3044,12 @@ describe('storage', function () {
await Promise.all([file.delete, copiedFile.delete()]);
});

it('should respect predefined Acl at file#copy', async () => {
/**
* TODO: Re-enable once the test environment allows public IAM roles.
* Currently disabled to avoid 403 errors when adding 'allUsers' or
* 'allAuthenticatedUsers' permissions.
*/
it.skip('should respect predefined Acl at file#copy', async () => {
const opts = {destination: 'CloudLogo'};
const [file] = await bucket.upload(FILES.logo.path, opts);
const copyOpts = {predefinedAcl: 'publicRead'};
Expand Down
Loading