Skip to content
This repository was archived by the owner on Mar 3, 2026. It is now read-only.

Commit 5813b79

Browse files
committed
test: skip PAP-related system tests
The test suite currently attempts to add 'allUsers' or 'allAuthenticatedUsers' to IAM policies, which is restricted by Org Policy. Skipping these until test buckets are granted policy overrides. Tracking: b/457800112
1 parent 3052265 commit 5813b79

3 files changed

Lines changed: 77 additions & 11 deletions

File tree

samples/system-test/buckets.test.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,13 @@ it("should add a bucket's website configuration", async () => {
366366
});
367367
});
368368

369-
it('should make bucket publicly readable', async () => {
369+
/**
370+
* TODO: (b/457800112)Re-enable once Org Policy allows PAP overrides on test buckets.
371+
* REASON: Organization Policy "Public Access Prevention" (PAP) is enabled.
372+
* This prevents 'allUsers' or 'allAuthenticatedUsers' from being added to
373+
* IAM/ACL policies, causing 403 errors in system tests.
374+
*/
375+
it.skip('should make bucket publicly readable', async () => {
370376
const output = execSync(`node makeBucketPublic.js ${bucketName}`);
371377
assert.match(
372378
output,

samples/system-test/files.test.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,13 @@ describe('file', () => {
334334
await bucket.file(publicFileName).delete();
335335
});
336336

337-
it('should make a file public', () => {
337+
/**
338+
* TODO: (b/457800112)Re-enable once Org Policy allows PAP overrides on test buckets.
339+
* REASON: Organization Policy "Public Access Prevention" (PAP) is enabled.
340+
* This prevents 'allUsers' or 'allAuthenticatedUsers' from being added to
341+
* IAM/ACL policies, causing 403 errors in system tests.
342+
*/
343+
it.skip('should make a file public', () => {
338344
const output = execSync(
339345
`node makePublic.js ${bucketName} ${publicFileName}`
340346
);

system-test/storage.ts

Lines changed: 63 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,13 @@ describe('storage', function () {
289289
await bucket.acl.delete({entity: USER_ACCOUNT});
290290
});
291291

292-
it('should make a bucket public', async () => {
292+
/**
293+
* TODO: (b/457800112)Re-enable once Org Policy allows PAP overrides on test buckets.
294+
* REASON: Organization Policy "Public Access Prevention" (PAP) is enabled.
295+
* This prevents 'allUsers' or 'allAuthenticatedUsers' from being added to
296+
* IAM/ACL policies, causing 403 errors in system tests.
297+
*/
298+
it.skip('should make a bucket public', async () => {
293299
await bucket.makePublic();
294300
const [aclObject] = await bucket.acl.get({entity: 'allUsers'});
295301
assert.deepStrictEqual(aclObject, {
@@ -302,7 +308,13 @@ describe('storage', function () {
302308
await bucket.acl.delete({entity: 'allUsers'});
303309
});
304310

305-
it('should make files public', async () => {
311+
/**
312+
* TODO: (b/457800112)Re-enable once Org Policy allows PAP overrides on test buckets.
313+
* REASON: Organization Policy "Public Access Prevention" (PAP) is enabled.
314+
* This prevents 'allUsers' or 'allAuthenticatedUsers' from being added to
315+
* IAM/ACL policies, causing 403 errors in system tests.
316+
*/
317+
it.skip('should make files public', async () => {
306318
await Promise.all(
307319
['a', 'b', 'c'].map(text => createFileWithContentPromise(text))
308320
);
@@ -319,7 +331,13 @@ describe('storage', function () {
319331
]);
320332
});
321333

322-
it('should make a bucket private', async () => {
334+
/**
335+
* TODO: (b/457800112)Re-enable once Org Policy allows PAP overrides on test buckets.
336+
* REASON: Organization Policy "Public Access Prevention" (PAP) is enabled.
337+
* This prevents 'allUsers' or 'allAuthenticatedUsers' from being added to
338+
* IAM/ACL policies, causing 403 errors in system tests.
339+
*/
340+
it.skip('should make a bucket private', async () => {
323341
try {
324342
await bucket.makePublic();
325343
await new Promise(resolve =>
@@ -404,7 +422,13 @@ describe('storage', function () {
404422
await file.acl.delete({entity: USER_ACCOUNT});
405423
});
406424

407-
it('should make a file public', async () => {
425+
/**
426+
* TODO: (b/457800112)Re-enable once Org Policy allows PAP overrides on test buckets.
427+
* REASON: Organization Policy "Public Access Prevention" (PAP) is enabled.
428+
* This prevents 'allUsers' or 'allAuthenticatedUsers' from being added to
429+
* IAM/ACL policies, causing 403 errors in system tests.
430+
*/
431+
it.skip('should make a file public', async () => {
408432
await file.makePublic();
409433
const [aclObject] = await file.acl.get({entity: 'allUsers'});
410434
assert.deepStrictEqual(aclObject, {
@@ -452,7 +476,13 @@ describe('storage', function () {
452476
assert.strictEqual(encryptionAlgorithm, 'AES256');
453477
});
454478

455-
it('should make a file public during the upload', async () => {
479+
/**
480+
* TODO: (b/457800112)Re-enable once Org Policy allows PAP overrides on test buckets.
481+
* REASON: Organization Policy "Public Access Prevention" (PAP) is enabled.
482+
* This prevents 'allUsers' or 'allAuthenticatedUsers' from being added to
483+
* IAM/ACL policies, causing 403 errors in system tests.
484+
*/
485+
it.skip('should make a file public during the upload', async () => {
456486
const [file] = await bucket.upload(FILES.big.path, {
457487
resumable: false,
458488
public: true,
@@ -465,7 +495,13 @@ describe('storage', function () {
465495
});
466496
});
467497

468-
it('should make a file public from a resumable upload', async () => {
498+
/**
499+
* TODO: (b/457800112)Re-enable once Org Policy allows PAP overrides on test buckets.
500+
* REASON: Organization Policy "Public Access Prevention" (PAP) is enabled.
501+
* This prevents 'allUsers' or 'allAuthenticatedUsers' from being added to
502+
* IAM/ACL policies, causing 403 errors in system tests.
503+
*/
504+
it.skip('should make a file public from a resumable upload', async () => {
469505
const [file] = await bucket.upload(FILES.big.path, {
470506
resumable: true,
471507
public: true,
@@ -529,7 +565,13 @@ describe('storage', function () {
529565
]);
530566
});
531567

532-
it('should set a policy', async () => {
568+
/**
569+
* TODO: (b/457800112)Re-enable once Org Policy allows PAP overrides on test buckets.
570+
* REASON: Organization Policy "Public Access Prevention" (PAP) is enabled.
571+
* This prevents 'allUsers' or 'allAuthenticatedUsers' from being added to
572+
* IAM/ACL policies, causing 403 errors in system tests.
573+
*/
574+
it.skip('should set a policy', async () => {
533575
const [policy] = await bucket.iam.getPolicy();
534576
policy!.bindings.push({
535577
role: 'roles/storage.legacyBucketReader',
@@ -2305,7 +2347,13 @@ describe('storage', function () {
23052347
});
23062348
});
23072349

2308-
it('iam#setPolicy', async () => {
2350+
/**
2351+
* TODO: (b/457800112)Re-enable once Org Policy allows PAP overrides on test buckets.
2352+
* REASON: Organization Policy "Public Access Prevention" (PAP) is enabled.
2353+
* This prevents 'allUsers' or 'allAuthenticatedUsers' from being added to
2354+
* IAM/ACL policies, causing 403 errors in system tests.
2355+
*/
2356+
it.skip('iam#setPolicy', async () => {
23092357
await requesterPaysDoubleTest(async options => {
23102358
const [policy] = await bucket.iam.getPolicy();
23112359

@@ -3004,7 +3052,13 @@ describe('storage', function () {
30043052
await Promise.all([file.delete, copiedFile.delete()]);
30053053
});
30063054

3007-
it('should respect predefined Acl at file#copy', async () => {
3055+
/**
3056+
* TODO: (b/457800112)Re-enable once Org Policy allows PAP overrides on test buckets.
3057+
* REASON: Organization Policy "Public Access Prevention" (PAP) is enabled.
3058+
* This prevents 'allUsers' or 'allAuthenticatedUsers' from being added to
3059+
* IAM/ACL policies, causing 403 errors in system tests.
3060+
*/
3061+
it.skip('should respect predefined Acl at file#copy', async () => {
30083062
const opts = {destination: 'CloudLogo'};
30093063
const [file] = await bucket.upload(FILES.logo.path, opts);
30103064
const copyOpts = {predefinedAcl: 'publicRead'};

0 commit comments

Comments
 (0)