Skip to content

Commit 9d57dd0

Browse files
committed
Add codeinclude markers to test file for documentation embedding
1 parent 6af8163 commit 9d57dd0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/modules/vault.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,12 @@ npm install @testcontainers/vault --save-dev
1010

1111
## Examples
1212

13-
Start a Vault container with a root token:
14-
1513
<!--codeinclude-->
1614

1715
[Start and perform read/write with node-vault:](../../packages/modules/vault/src/vault-container.test.ts) inside_block:readWrite
1816

1917
<!--/codeinclude-->
2018

21-
Initialize secret engines and keys using Vault CLI:
22-
2319
<!--codeinclude-->
2420

2521
[Run Vault CLI init commands at startup:](../../packages/modules/vault/src/vault-container.test.ts) inside_block:initCommands

packages/modules/vault/src/vault-container.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ describe("vault", { timeout: 180_000 }, () => {
1111
await container?.stop();
1212
});
1313

14+
// inside_block:readWrite {
1415
it("should start Vault and allow reading/writing secrets", async () => {
1516
container = await new VaultContainer().withVaultToken(VAULT_TOKEN).start();
1617

@@ -35,7 +36,9 @@ describe("vault", { timeout: 180_000 }, () => {
3536
expect(data.message).toBe("world");
3637
expect(data.other).toBe("vault");
3738
});
39+
// }
3840

41+
// inside_block:initCommands {
3942
it("should execute init commands using vault CLI", async () => {
4043
container = await new VaultContainer()
4144
.withVaultToken(VAULT_TOKEN)
@@ -47,4 +50,5 @@ describe("vault", { timeout: 180_000 }, () => {
4750
expect(result.exitCode).toBe(0);
4851
expect(result.output).toContain("my-key");
4952
});
53+
// }
5054
});

0 commit comments

Comments
 (0)