Skip to content

Commit 45c6271

Browse files
committed
Test
1 parent 6af6f28 commit 45c6271

File tree

2 files changed

+23
-8
lines changed

2 files changed

+23
-8
lines changed

.github/workflows/gcs_emulator_tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
with:
4848
check-port: '9199'
4949
emulators: 'storage'
50-
project-id: 'test-project'
50+
working-directory: packages/google_cloud_storage/emulator_test
5151
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
5252
- uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c
5353
with:
Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,35 @@
11
# Google Cloud Storage Emulator Tests
22

3-
Tests that verify that the Google Cloud Storage client library works correctly
4-
with the Firebase Storage Emulator.
3+
This directory contains integration tests that verify the compatibility of
4+
`package:google_cloud_storage` with the [Firebase Storage Emulator][].
55

6-
## Running these tests locally
6+
## Running Tests Locally
77

8-
To run these tests locally, the Firebase Storage Emulator must be running.
8+
To run these tests on your machine, you need to have the emulator running in one terminal session and execute the tests in another.
9+
10+
### 1. Start the Firebase Emulator
11+
12+
Navigate to this directory and start the storage emulator:
913

1014
```bash
11-
# Run inside this directory.
15+
# From packages/google_cloud_storage/emulator_test
1216
firebase emulators:start
1317
```
1418

15-
and then:
19+
### 2. Run the Tests
20+
21+
In a separate terminal, navigate to the root of the `google_cloud_storage` package and run the tests:
1622

1723
```bash
18-
# Run inside the google_cloud_storage directory
24+
# From packages/google_cloud_storage
1925
dart test emulator_test
2026
```
27+
28+
## Known Limitations
29+
30+
The Firebase Storage Emulator is a high-fidelity implementation of the Cloud Storage for Firebase API, which is a subset of the full Google Cloud Storage JSON API. Consequently:
31+
32+
- Some advanced GCS features (e.g., Object Retention/Lock, certain IAM configurations, or specific query parameters) may return a `NotImplementedException` (HTTP 501) or `BadRequestException`.
33+
- Always verify critical production logic against a live GCS project using the recorded API tests in the `test/` directory.
34+
35+
[Firebase Storage Emulator]: https://firebase.google.com/docs/emulator-suite/connect_storage

0 commit comments

Comments
 (0)