Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
162 commits
Select commit Hold shift + click to select a range
a2cd00b
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
72c17d7
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
3b2a681
docs: add gaxios and node 18 migration guide
thiyaguk09 May 20, 2026
ea376ce
docs: add examples for passing options headers and URL resolution
thiyaguk09 May 20, 2026
8eb2d72
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
eacb087
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
49a2b5a
Merge remote-tracking branch 'upstream/storage-node-18' into docs/gax…
thiyaguk09 May 21, 2026
b1a228c
Merge remote-tracking branch 'upstream/storage-node-18' into docs/gax…
thiyaguk09 May 21, 2026
683b3f4
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
0c58a9a
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
51c3e81
Merge remote-tracking branch 'upstream/storage-node-18' into docs/gax…
thiyaguk09 May 25, 2026
b5c81a1
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
fe44861
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
197b249
Merge remote-tracking branch 'upstream/storage-node-18' into docs/gax…
thiyaguk09 May 26, 2026
7c3ee50
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
0a4f5ac
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
86f0fb7
Merge remote-tracking branch 'upstream/storage-node-18' into docs/gax…
thiyaguk09 May 27, 2026
ef7c4d4
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
e3288e3
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
dafce2e
Merge remote-tracking branch 'upstream/storage-node-18' into docs/gax…
thiyaguk09 Jun 1, 2026
3dd33a5
test: add bytes method to mock responses in acl and headers tests
thiyaguk09 Jun 1, 2026
eb547c4
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
1fba172
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
5ad4fef
Merge remote-tracking branch 'upstream/storage-node-18' into docs/gax…
thiyaguk09 Jun 2, 2026
fafab27
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
d4b912f
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
4f6f722
Merge remote-tracking branch 'upstream/storage-node-18' into docs/gax…
thiyaguk09 Jun 3, 2026
c5be999
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
c0a6220
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
0a2ebe9
Merge remote-tracking branch 'upstream/storage-node-18' into docs/gax…
thiyaguk09 Jun 4, 2026
4865c5d
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
747d276
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
0f2652b
test: add bytes method to mock Gaxios response in acl and headers tests
thiyaguk09 Jun 5, 2026
64b606d
Merge remote-tracking branch 'upstream/storage-node-18' into docs/gax…
thiyaguk09 Jun 5, 2026
a82723e
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
e366cc2
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
ffd2057
test: add bytes method to mock Gaxios response in acl and headers tests
thiyaguk09 Jun 5, 2026
9fcdde2
Merge remote-tracking branch 'upstream/storage-node-18' into docs/gax…
thiyaguk09 Jun 12, 2026
8a0e737
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
4f69ca3
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
2d55123
test: add bytes method to mock Gaxios response in acl and headers tests
thiyaguk09 Jun 5, 2026
01fc591
Merge remote-tracking branch 'upstream/storage-node-18' into docs/gax…
thiyaguk09 Jun 15, 2026
17ffbe5
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
3b19434
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
7d5c5ac
test: add bytes method to mock Gaxios response in acl and headers tests
thiyaguk09 Jun 5, 2026
7d41399
Merge remote-tracking branch 'upstream/storage-node-18' into docs/gax…
thiyaguk09 Jun 17, 2026
9379a79
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
2c0e9c8
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
9795e1d
Merge remote-tracking branch 'upstream/storage-node-18' into docs/gax…
thiyaguk09 Jun 18, 2026
fb221c3
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
696a337
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
82bf1ee
Merge remote-tracking branch 'upstream/storage-node-18' into docs/gax…
thiyaguk09 Jun 19, 2026
efaaf4b
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
fe055f7
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
2440361
Merge remote-tracking branch 'upstream/storage-node-18' into docs/gax…
thiyaguk09 Jun 22, 2026
e03e122
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
7218474
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
d4ee55c
fix(storage): resolve transport and retry issues (#8235)
thiyaguk09 Jun 23, 2026
9271939
lint fix
thiyaguk09 Jun 23, 2026
e2c0efc
Merge remote-tracking branch 'upstream/storage-node-18' into docs/gax…
thiyaguk09 Jun 23, 2026
de6b408
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
20fcb11
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
9519ae8
fix(storage): resolve transport and retry issues (#8235)
thiyaguk09 Jun 23, 2026
1819fe4
lint fix
thiyaguk09 Jun 23, 2026
041d008
Merge branch 'storage-node-18' into docs/gaxios-migration-guide
thiyaguk09 Jun 23, 2026
85c50e2
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
0979efb
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
ba27a8f
fix(storage): resolve transport and retry issues (#8235)
thiyaguk09 Jun 23, 2026
948d035
lint fix
thiyaguk09 Jun 23, 2026
d235ddd
Merge branch 'storage-node-18' into docs/gaxios-migration-guide
thiyaguk09 Jun 24, 2026
fc44591
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
a81e28d
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
018f71e
fix(storage): resolve transport and retry issues (#8235)
thiyaguk09 Jun 23, 2026
43fc1e8
lint fix
thiyaguk09 Jun 23, 2026
237814d
Merge branch 'storage-node-18' into docs/gaxios-migration-guide
thiyaguk09 Jun 25, 2026
1946ca8
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
bae6491
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
aeb3a02
fix(storage): resolve transport and retry issues (#8235)
thiyaguk09 Jun 23, 2026
3217d07
lint fix
thiyaguk09 Jun 23, 2026
5b2fcef
Merge branch 'storage-node-18' into docs/gaxios-migration-guide
thiyaguk09 Jun 26, 2026
6723f3e
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
43fc14b
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
3f1dcdf
fix(storage): resolve transport and retry issues (#8235)
thiyaguk09 Jun 23, 2026
0d373cf
lint fix
thiyaguk09 Jun 23, 2026
a7b6e27
Merge branch 'storage-node-18' into docs/gaxios-migration-guide
thiyaguk09 Jun 29, 2026
0a993d6
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
4f16b2e
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
dae5c48
fix(storage): resolve transport and retry issues (#8235)
thiyaguk09 Jun 23, 2026
b1a54b0
lint fix
thiyaguk09 Jun 23, 2026
66bdc7c
Merge branch 'storage-node-18' into docs/gaxios-migration-guide
thiyaguk09 Jul 1, 2026
de16592
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
82a2239
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
74e6d6b
fix(storage): resolve transport and retry issues (#8235)
thiyaguk09 Jun 23, 2026
f41a664
lint fix
thiyaguk09 Jun 23, 2026
0100a7a
Merge branch 'storage-node-18' into docs/gaxios-migration-guide
thiyaguk09 Jul 3, 2026
111aa89
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
eaf8c63
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
a5aac31
fix(storage): resolve transport and retry issues (#8235)
thiyaguk09 Jun 23, 2026
b4ac2f3
lint fix
thiyaguk09 Jun 23, 2026
1ff2849
Merge branch 'storage-node-18' into docs/gaxios-migration-guide
thiyaguk09 Jul 7, 2026
20e15b0
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
c9e4407
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
01223bc
fix(storage): resolve transport and retry issues (#8235)
thiyaguk09 Jun 23, 2026
72b5e10
lint fix
thiyaguk09 Jun 23, 2026
4aaba8a
Merge branch 'storage-node-18' into docs/gaxios-migration-guide
thiyaguk09 Jul 8, 2026
b0498ea
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
40f27b2
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
4b31465
fix(storage): resolve transport and retry issues (#8235)
thiyaguk09 Jun 23, 2026
191e96c
lint fix
thiyaguk09 Jun 23, 2026
1e0e7cf
Merge branch 'storage-node-18' into docs/gaxios-migration-guide
thiyaguk09 Jul 9, 2026
38849e1
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
2e8a5c9
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
929c38d
fix(storage): resolve transport and retry issues (#8235)
thiyaguk09 Jun 23, 2026
560a61b
lint fix
thiyaguk09 Jun 23, 2026
4b62544
Merge branch 'storage-node-18' into docs/gaxios-migration-guide
thiyaguk09 Jul 21, 2026
2161bde
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
b52e1f7
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
58ec490
fix(storage): resolve transport and retry issues (#8235)
thiyaguk09 Jun 23, 2026
99d0a21
lint fix
thiyaguk09 Jun 23, 2026
9efafe2
Merge branch 'storage-node-18' into docs/gaxios-migration-guide
thiyaguk09 Jul 22, 2026
487c6e3
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
7920b7e
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
a31e5be
fix(storage): resolve transport and retry issues (#8235)
thiyaguk09 Jun 23, 2026
d8af687
lint fix
thiyaguk09 Jun 23, 2026
d814f95
Merge branch 'storage-node-18' into docs/gaxios-migration-guide
thiyaguk09 Jul 23, 2026
dbd46bc
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
7e8f9ec
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
ad50970
fix(storage): resolve transport and retry issues (#8235)
thiyaguk09 Jun 23, 2026
ae0485b
lint fix
thiyaguk09 Jun 23, 2026
d1c63b4
Merge branch 'storage-node-18' into docs/gaxios-migration-guide
thiyaguk09 Jul 24, 2026
6ea2aee
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
321d91d
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
48db3ca
fix(storage): resolve transport and retry issues (#8235)
thiyaguk09 Jun 23, 2026
2686699
lint fix
thiyaguk09 Jun 23, 2026
dfe06aa
Merge branch 'storage-node-18' into docs/gaxios-migration-guide
thiyaguk09 Jul 27, 2026
106c994
fix(storage): Invocation ID is not retained on multipart upload retri…
thiyaguk09 Jul 28, 2026
bebe7f1
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
8975172
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
b984e82
fix(storage): resolve transport and retry issues (#8235)
thiyaguk09 Jun 23, 2026
58ef9bf
lint fix
thiyaguk09 Jun 23, 2026
b16d16a
fix(storage): Invocation ID is not retained on multipart upload retri…
thiyaguk09 Jul 28, 2026
11d1cd3
Merge branch 'storage-node-18' into docs/gaxios-migration-guide
thiyaguk09 Jul 28, 2026
c74628a
Merge branch 'storage-node-18' into docs/gaxios-migration-guide
thiyaguk09 Jul 28, 2026
678f64c
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
676e767
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
fd0a8fc
fix(storage): resolve transport and retry issues (#8235)
thiyaguk09 Jun 23, 2026
c6cbede
lint fix
thiyaguk09 Jun 23, 2026
374f80d
fix(storage): Invocation ID is not retained on multipart upload retri…
thiyaguk09 Jul 28, 2026
44d015b
Merge branch 'storage-node-18' into docs/gaxios-migration-guide
thiyaguk09 Jul 28, 2026
4937d6c
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
6ba890f
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
2ad86cc
fix(storage): resolve transport and retry issues (#8235)
thiyaguk09 Jun 23, 2026
4f26b73
lint fix
thiyaguk09 Jun 23, 2026
7b78138
fix(storage): Invocation ID is not retained on multipart upload retri…
thiyaguk09 Jul 28, 2026
937490d
Merge branch 'storage-node-18' into docs/gaxios-migration-guide
thiyaguk09 Jul 29, 2026
9875e06
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
7ec256e
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
690b5a1
fix(storage): resolve transport and retry issues (#8235)
thiyaguk09 Jun 23, 2026
4e72213
lint fix
thiyaguk09 Jun 23, 2026
81b96dc
fix(storage): Invocation ID is not retained on multipart upload retri…
thiyaguk09 Jul 28, 2026
a409ff8
Merge branch 'storage-node-18' into docs/gaxios-migration-guide
thiyaguk09 Jul 30, 2026
652932c
Merge branch 'storage-node-18' into docs/gaxios-migration-guide
thiyaguk09 Jul 31, 2026
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
84 changes: 84 additions & 0 deletions handwritten/storage/MIGRATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Storage v7 to v8 Migration Guide - Node.js 18 & Gaxios Update

This guide helps you migrate your application from `@google-cloud/storage` v7 to v8, focusing on the transition to Node.js 18+ as the minimum supported environment and changes introduced by updating the underlying HTTP client, `gaxios`, to version 7.

## Minimum Requirements: Node.js 18

`@google-cloud/storage` v8 now officially requires Node.js 18 or higher. This update aligns the library with modern JavaScript environments.

Specifically, Node.js 18 introduced native global Web APIs (such as `fetch` and `Headers`). Conforming to this standard, the underlying HTTP client, `gaxios` (updated to v7), leverages native `Headers` rather than custom user-land header representations. As a result, `@google-cloud/storage` v8 has transitioned response and request headers to standard native global `Headers` objects.


## Key Breaking Changes for Storage Users

### 1. Response Headers are now `Headers` objects

When you receive a full API response from Storage methods (e.g., via callbacks or promise resolutions that include the response object), the `headers` property of the response is now a standard native `Headers` object (aligned with the Fetch API standard in Node.js 18) rather than a plain JavaScript object.

**Before (Storage v7):**

```js
const [retrievedFile, apiResponse] = await file.get();
const contentType = apiResponse.headers['content-type'];
```

**After (Storage v8):**

```js
const [retrievedFile, apiResponse] = await file.get();
// Accessing headers requires the .get() method
const contentType = apiResponse.headers.get('content-type');
```

### 2. Passing Headers in Options

If you pass custom headers in options to Storage methods (which extend `GaxiosOptions`), you can still pass plain objects, as the Storage library will convert them to standard `Headers` internally for the request. However, if you read them back from the prepared options or response, they will be `Headers` objects.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add examples for 2 and 3 as well

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added


**Before (Storage v7):**

```js
// Reading request headers back from response metadata returned a plain object
const customHeader = apiResponse.config.headers['x-custom-header'];
```

**After (Storage v8):**

```js
// Reading request headers back from response metadata requires .get()
const customHeader = apiResponse.config.headers.get('x-custom-header');
```

> [!WARNING]
> **Header Value Stringification:** Plain JavaScript objects allow passing non-string values (such as arrays or numbers) which are implicitly processed. However, the native `Headers` constructor strictly converts all values to standard string representations. For example, passing an array of values (e.g., `['val1', 'val2']`) will result in a single comma-separated string (e.g., `'val1, val2'`). Ensure you pre-format or verify your header values before passing them to custom options.


### 3. URL Resolution (`baseURL`)

If you are using custom `baseURL` options or passing relative URLs to methods that accept them, be aware that resolution now strictly follows the standard native `URL` constructor spec (`new URL(url, baseURL)`). This can affect how leading slashes in paths resolve.

**Before (Storage v7):**

Using standard path-joining custom resolution:
- `baseURL`: `https://storage.googleapis.com/storage/v1`
- `url`: `/b/my-bucket`
- Resolved URL: `https://storage.googleapis.com/storage/v1/b/my-bucket`

**After (Storage v8):**

Strictly resolved via the standard native `URL` constructor rules (where a leading slash resolves relative to the root of the host):
- `baseURL`: `https://storage.googleapis.com/storage/v1`
- `url`: `/b/my-bucket`
- Resolved URL: `https://storage.googleapis.com/b/my-bucket` (resolves relative to host root, stripping `storage/v1`)


## Upgrade Instructions

Update your `@google-cloud/storage` dependency to version 8:

```sh
npm install @google-cloud/storage@latest
```

## Troubleshooting

- If you encounter `undefined` when accessing headers on the response object, ensure you are using `apiResponse.headers.get('header-name')`.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gaxios is indirect dependency?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, it's direct dependency.

56 changes: 8 additions & 48 deletions handwritten/storage/system-test/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,7 @@ describe('storage', function () {
await bucket.acl.delete({entity: USER_ACCOUNT});
});

/**
* 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 () => {
it('should make a bucket public', async () => {
await bucket.makePublic();
const [aclObject] = await bucket.acl.get({entity: 'allUsers'});
assert.deepStrictEqual(aclObject, {
Expand All @@ -304,12 +299,7 @@ describe('storage', function () {
await bucket.acl.delete({entity: 'allUsers'});
});

/**
* 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 () => {
it('should make files public', async () => {
await Promise.all(
['a', 'b', 'c'].map(text => createFileWithContentPromise(text)),
);
Expand All @@ -326,12 +316,7 @@ 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.
*/
it.skip('should make a bucket private', async () => {
it('should make a bucket private', async () => {
try {
await bucket.makePublic();
await new Promise(resolve =>
Expand Down Expand Up @@ -416,12 +401,7 @@ describe('storage', function () {
await file.acl.delete({entity: USER_ACCOUNT});
});

/**
* 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 () => {
it('should make a file public', async () => {
await file.makePublic();
const [aclObject] = await file.acl.get({entity: 'allUsers'});
assert.deepStrictEqual(aclObject, {
Expand Down Expand Up @@ -469,12 +449,7 @@ describe('storage', function () {
assert.strictEqual(encryptionAlgorithm, 'AES256');
});

/**
* 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 () => {
it('should make a file public during the upload', async () => {
const [file] = await bucket.upload(FILES.big.path, {
resumable: false,
public: true,
Expand All @@ -487,12 +462,7 @@ 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.
*/
it.skip('should make a file public from a resumable upload', async () => {
it('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 @@ -556,12 +526,7 @@ 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.
*/
it.skip('should set a policy', async () => {
it('should set a policy', async () => {
const [policy] = await bucket.iam.getPolicy();
policy!.bindings.push({
role: 'roles/storage.legacyBucketReader',
Expand Down Expand Up @@ -3141,12 +3106,7 @@ describe('storage', function () {
await Promise.all([file.delete, copiedFile.delete()]);
});

/**
* 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 () => {
it('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