Skip to content

Commit ff63418

Browse files
authored
Add BigQueryEmulatorContainer to gcloud module (#862)
1 parent ab27fa8 commit ff63418

File tree

7 files changed

+196
-71
lines changed

7 files changed

+196
-71
lines changed

docs/modules/gcloud.md

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@ npm install @testcontainers/gcloud --save-dev
1111
The module now supports multiple emulators, including `firestore`, which offers both `native` and `datastore` modes.
1212
To utilize these emulators, you should employ the following classes:
1313

14-
Mode | Class | Container Image
14+
Emulator | Class | Container Image
1515
-|-|-
16-
Firestore Native mode | FirestoreEmulatorContainer | [gcr.io/google.com/cloudsdktool/google-cloud-cli:emulators](https://gcr.io/google.com/cloudsdktool/google-cloud-cli)
17-
Firestore Datastore mode | DatastoreEmulatorContainer | [gcr.io/google.com/cloudsdktool/google-cloud-cli:emulators](https://gcr.io/google.com/cloudsdktool/google-cloud-cli)
18-
Cloud PubSub mode |PubSubEmulatorContainer | [gcr.io/google.com/cloudsdktool/google-cloud-cli:emulators](https://gcr.io/google.com/cloudsdktool/google-cloud-cli)
19-
Cloud Storage mode |CloudStorageEmulatorContainer | [https://hub.docker.com/r/fsouza/fake-gcs-server](https://hub.docker.com/r/fsouza/fake-gcs-server)
16+
Firestore (Native mode) | FirestoreEmulatorContainer | [gcr.io/google.com/cloudsdktool/google-cloud-cli:emulators](https://gcr.io/google.com/cloudsdktool/google-cloud-cli)
17+
Firestore (Datastore mode) | DatastoreEmulatorContainer | [gcr.io/google.com/cloudsdktool/google-cloud-cli:emulators](https://gcr.io/google.com/cloudsdktool/google-cloud-cli)
18+
Cloud PubSub | PubSubEmulatorContainer | [gcr.io/google.com/cloudsdktool/google-cloud-cli:emulators](https://gcr.io/google.com/cloudsdktool/google-cloud-cli)
19+
Cloud Storage | CloudStorageEmulatorContainer | [https://hub.docker.com/r/fsouza/fake-gcs-server](https://hub.docker.com/r/fsouza/fake-gcs-server)
20+
BigQuery | BigQueryEmulatorContainer | [ghcr.io/goccy/bigquery-emulator](ghcr.io/goccy/bigquery-emulator)
2021

2122
## Examples
2223

23-
### Firestore Native mode
24+
### Firestore (Native mode)
2425

2526
<!--codeinclude-->
2627
[Starting a Firestore Emulator container with the default image](../../packages/modules/gcloud/src/firestore-emulator-container.test.ts) inside_block:firestore4
@@ -30,7 +31,7 @@ Cloud Storage mode |CloudStorageEmulatorContainer | [https://hub.docker.com/r/fs
3031
[Starting a Firestore Emulator container with a custom emulator image](../../packages/modules/gcloud/src/firestore-emulator-container.test.ts) inside_block:firestore5
3132
<!--/codeinclude-->
3233

33-
### Firestore Datastore mode
34+
### Firestore (Datastore mode)
3435

3536
<!--codeinclude-->
3637
[Starting a Datastore Emulator container with the default image](../../packages/modules/gcloud/src/datastore-emulator-container.test.ts) inside_block:datastore4
@@ -40,15 +41,24 @@ Cloud Storage mode |CloudStorageEmulatorContainer | [https://hub.docker.com/r/fs
4041
[Starting a Datastore Emulator container with a custom emulator image](../../packages/modules/gcloud/src/datastore-emulator-container.test.ts) inside_block:datastore5
4142
<!--/codeinclude-->
4243

43-
### Cloud PubSub mode
44+
### Cloud PubSub
4445

4546
<!--codeinclude-->
46-
[Starting a Cloud PubSub Emulator container with the default image](../../packages/modules/gcloud/src/pubsub-emulator-container.test.ts) inside_block:pubsub6
47+
[Starting a Cloud PubSub Emulator container with the default image](../../packages/modules/gcloud/src/pubsub-emulator-container.test.ts)
4748
<!--/codeinclude-->
4849

49-
### Cloud Storage mode
50+
### Cloud Storage
5051

51-
The Cloud Storage mode doesn't rely on a built-in emulator created by Google but instead depends on a fake Cloud Storage server implemented by [Francisco Souza](https://github.com/fsouza). The project is open-source, and the repository can be found at [fsouza/fake-gcs-server](https://github.com/fsouza/fake-gcs-server).
52+
The Cloud Storage container doesn't rely on a built-in emulator created by Google but instead depends on a fake Cloud Storage server implemented by [Francisco Souza](https://github.com/fsouza). The project is open-source, and the repository can be found at [fsouza/fake-gcs-server](https://github.com/fsouza/fake-gcs-server).
5253
<!--codeinclude-->
53-
[Starting a Cloud Storage Emulator container with the default image](../../packages/modules/gcloud/src/cloudstorage-emulator-container.test.ts) inside_block:cloudstorage7
54+
[Starting a Cloud Storage Emulator container with the default image](../../packages/modules/gcloud/src/cloudstorage-emulator-container.test.ts) inside_block:cloud-storage
55+
<!--/codeinclude-->
56+
57+
### BigQuery
58+
59+
The BigQuery container doesn't rely on a built-in emulator created by Google, but instead depends on an implementation written in Go by [Masaaki Goshima](https://github.com/goccy). The project is open-source, and the repository can be found at [goccy/bigquery-emulator](https://github.com/goccy/bigquery-emulator).
60+
61+
BigQuery emulator uses [go-zetasqlite](https://github.com/goccy/go-zetasqlite) to interpret ZetaSQL (the language used in BigQuery) and runs it in SQLite. The [README](https://github.com/goccy/go-zetasqlite?tab=readme-ov-file#status) lists BigQuery features currently supported.
62+
<!--codeinclude-->
63+
[Starting a BigQuery Emulator container with the default image](../../packages/modules/gcloud/src/bigquery-emulator-container.test.ts)
5464
<!--/codeinclude-->

0 commit comments

Comments
 (0)