Skip to content

Commit 4836bda

Browse files
Merge branch 'main' into add-support-for-ts-using
2 parents 1fbfd35 + 84f83ab commit 4836bda

19 files changed

+1541
-17
lines changed

docs/modules/gcloud.md

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ Testcontainers module for the Google Cloud Platform's [Cloud SDK](https://cloud.
88
npm install @testcontainers/gcloud --save-dev
99
```
1010

11-
The module now supports multiple emulators, including `firestore`, which offers both `native` and `datastore` modes.
12-
To utilize these emulators, you should employ the following classes:
11+
The module supports multiple emulators. Use the following classes:
1312

14-
Emulator | Class | Container Image
13+
Emulator | Class | Container Image
1514
-|-|-
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)
15+
Firestore (Native mode) | FirestoreEmulatorContainer | [gcr.io/google.com/cloudsdktool/google-cloud-cli:emulators](https://gcr.io/google.com/cloudsdktool/google-cloud-cli)
16+
Firestore (Datastore mode) | DatastoreEmulatorContainer | [gcr.io/google.com/cloudsdktool/google-cloud-cli:emulators](https://gcr.io/google.com/cloudsdktool/google-cloud-cli)
1817
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)
18+
Cloud Storage | CloudStorageEmulatorContainer | [fsouza/fake-gcs-server:1.52.2](https://hub.docker.com/r/fsouza/fake-gcs-server)
19+
BigQuery | BigQueryEmulatorContainer | [ghcr.io/goccy/bigquery-emulator:0.6.6](https://ghcr.io/goccy/bigquery-emulator)
20+
Cloud Spanner | SpannerEmulatorContainer | [gcr.io/cloud-spanner-emulator/emulator:1.5.37](https://gcr.io/cloud-spanner-emulator/emulator:1.5.37)
2121

2222
## Examples
2323

@@ -49,16 +49,32 @@ BigQuery | BigQueryEmulatorContainer | [ghcr.io/goccy/bigquery-emulator](ghcr.
4949

5050
### Cloud Storage
5151

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).
52+
The Cloud Storage container uses a fake Cloud Storage server by [Francisco Souza](https://github.com/fsouza).
53+
5354
<!--codeinclude-->
5455
[Starting a Cloud Storage Emulator container with the default image](../../packages/modules/gcloud/src/cloudstorage-emulator-container.test.ts) inside_block:cloud-storage
5556
<!--/codeinclude-->
5657

5758
### BigQuery
5859

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+
The BigQuery emulator is by [Masaaki Goshima](https://github.com/goccy) and uses [go-zetasqlite](https://github.com/goccy/go-zetasqlite).
6061

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.
6262
<!--codeinclude-->
6363
[Starting a BigQuery Emulator container with the default image](../../packages/modules/gcloud/src/bigquery-emulator-container.test.ts)
6464
<!--/codeinclude-->
65+
66+
### Cloud Spanner
67+
68+
The Cloud Spanner emulator container wraps Google's official emulator image.
69+
70+
<!--codeinclude-->
71+
[Starting a Spanner Emulator container and exposing endpoints using explicitly configured client](../../packages/modules/gcloud/src/spanner-emulator-container.test.ts) inside_block:startupWithExplicitClient
72+
<!--/codeinclude-->
73+
74+
<!--codeinclude-->
75+
[Starting a Spanner Emulator container and exposing endpoints using projectId and SPANNER_EMULATOR_HOST](../../packages/modules/gcloud/src/spanner-emulator-container.test.ts) inside_block:startupWithEnvironmentVariable
76+
<!--/codeinclude-->
77+
78+
<!--codeinclude-->
79+
[Creating and deleting instance and database via helper](../../packages/modules/gcloud/src/spanner-emulator-helper.test.ts) inside_block:createAndDelete
80+
<!--/codeinclude-->

docs/modules/vault.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Vault Module
2+
3+
[Vault](https://www.vaultproject.io/) by HashiCorp is a tool for securely accessing secrets such as API keys, passwords, or certificates. This module allows you to run and initialize a Vault container for integration tests.
4+
5+
## Install
6+
7+
```bash
8+
npm install @testcontainers/vault --save-dev
9+
```
10+
11+
## Examples
12+
13+
<!--codeinclude-->
14+
[Start and perform read/write with node-vault:](../../packages/modules/vault/src/vault-container.test.ts) inside_block:readWrite
15+
<!--/codeinclude-->
16+
17+
<!--codeinclude-->
18+
[Run Vault CLI init commands at startup:](../../packages/modules/vault/src/vault-container.test.ts) inside_block:initCommands
19+
<!--/codeinclude-->
20+
21+
## Why use Vault in integration tests?
22+
23+
With the growing adoption of Vault in modern infrastructure, testing components that depend on Vault for secret resolution or encryption can be complex. This module allows:
24+
25+
- Starting a local Vault instance during test runs
26+
- Seeding secrets or enabling engines with Vault CLI
27+
- Validating app behavior with secured data access
28+
29+
Use this module to test Vault-backed workflows without the need for pre-provisioned Vault infrastructure.

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,6 @@ nav:
8484
- Selenium: modules/selenium.md
8585
- ToxiProxy: modules/toxiproxy.md
8686
- Valkey: modules/valkey.md
87+
- Vault: modules/vault.md
8788
- Weaviate: modules/weaviate.md
8889
- Configuration: configuration.md

0 commit comments

Comments
 (0)