@ac-kit/integration-test-util 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,42 @@
1
+ # @ac-kit/integration-test-util
2
+
3
+ ## 0.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - a493b4a: **Breaking:** `initDockerSuite` no longer switches the machine's docker context,
8
+ and names everything it creates uniquely.
9
+
10
+ - `contextName` is now `context`, and it is passed to every docker command
11
+ instead of being installed with `docker context use`. The old behaviour raced
12
+ between concurrent suites and left the developer's own context switched when a
13
+ run crashed.
14
+ - The image tag and the container names now carry a random per-suite id, so two
15
+ suites — including two runs of the same file — can no longer share a tag, and
16
+ one suite's teardown can no longer remove another's image.
17
+ - Teardown runs every step even when an earlier one throws, reporting the
18
+ failures together, so a container that refuses to die no longer strands the
19
+ image. The image is marked for removal before the build rather than after, so
20
+ a build that tags and then fails still gets cleaned up.
21
+ - Containers are started detached. Without it a foreground container never
22
+ returned control to the test.
23
+ - New `onContainerStarting` and `onContainerStopping` hooks fire before the run
24
+ and while the container is still reachable, beside the existing
25
+ `onContainerStarted` and `onContainerStopped`.
26
+ - `containerRunOptions` may no longer set `name`, `context` or `detach`, which
27
+ the suite owns.
28
+
29
+ ### Patch Changes
30
+
31
+ - Updated dependencies [732a70b]
32
+ - Updated dependencies [a493b4a]
33
+ - Updated dependencies [a493b4a]
34
+ - Updated dependencies [a493b4a]
35
+ - Updated dependencies [a493b4a]
36
+ - Updated dependencies [2ab5593]
37
+ - Updated dependencies [a493b4a]
38
+ - Updated dependencies [a493b4a]
39
+ - Updated dependencies [70c1269]
40
+ - @ac-kit/cmd-docker@0.2.0
41
+ - @ac-kit/node@0.2.0
42
+ - @ac-kit/core@0.2.0
package/README.md CHANGED
@@ -7,13 +7,22 @@ speaking the protocol you expect.
7
7
  ```ts
8
8
  import { initDockerSuite, isTcpPortOpen } from "@ac-kit/integration-test-util";
9
9
 
10
- // Registers beforeAll/afterAll/afterEach hooks covering the whole container
11
- // lifecycle: build the image, stop and remove the container between tests.
12
- const suite = initDockerSuite("./fixtures/postfix");
10
+ // Registers beforeAll/beforeEach/afterEach/afterAll hooks covering the whole
11
+ // container lifecycle: build the image once, run a detached container per test,
12
+ // remove both afterwards. Every name it generates carries a random per-suite
13
+ // id, so concurrent suites never collide.
14
+ const suite = initDockerSuite("./fixtures/postfix", {
15
+ containerRunOptions: () => ({ publish: ["25:25"] }),
16
+ });
13
17
 
14
18
  await isTcpPortOpen(25, "127.0.0.1");
15
19
  ```
16
20
 
21
+ Pass `context` to run every command against one docker context; the suite never
22
+ switches the machine's active one. `onContainerStarting`/`onContainerStarted`
23
+ and `onContainerStopping`/`onContainerStopped` bracket each container, the
24
+ "stopping" hook firing while it is still reachable.
25
+
17
26
  Also exposes `tryTcpConnectAndReadBanner` and `tryTlsConnectAndReadBanner`, for
18
27
  waiting until a server is not merely listening but actually answering.
19
28
 
@@ -1,27 +1,48 @@
1
+ import { type DockerContainerName, type DockerContainerRunOptions } from "@ac-kit/cmd-docker";
2
+ import type { Except } from "type-fest";
1
3
  export type InitDockerSuiteOptions = {
4
+ /** Called with the name a container is about to be started under. */
5
+ onContainerStarting?: (name: DockerContainerName) => void | Promise<void>;
6
+ /** Called after a container is started. */
7
+ onContainerStarted?: (name: DockerContainerName) => void | Promise<void>;
8
+ /** Called before a container is removed, while it is still reachable. */
9
+ onContainerStopping?: (name: DockerContainerName) => void | Promise<void>;
10
+ /** Called after a container is removed. */
11
+ onContainerStopped?: (name: DockerContainerName) => void | Promise<void>;
2
12
  /**
3
- * Prefix for the container name.
13
+ * Options to use when starting a container.
4
14
  *
5
- * Defaults to "test-".
15
+ * The suite owns the name, the context and the detach flag: it has to know
16
+ * the name to remove the container, it runs every command against one
17
+ * context, and a container started in the foreground would never hand control
18
+ * back to the test.
6
19
  */
7
- containerNamePrefix?: string;
20
+ containerRunOptions?: (name: DockerContainerName) => Except<DockerContainerRunOptions, "name" | "context" | "detach">;
8
21
  /**
9
- * Docker context to switch to for all suite operations.
22
+ * Prefix for the image and container names.
10
23
  *
11
- * Defaults to "default".
24
+ * Defaults to "test-".
12
25
  */
13
- contextName?: string;
26
+ containerNamePrefix?: string;
27
+ /** Docker context to run every command of this suite against. */
28
+ context?: string;
29
+ /** Whether to reuse the same container instance across tests. */
30
+ reuseContainerInstance?: boolean;
14
31
  };
15
32
  export type DockerSuiteContext = {
16
- containerName: string;
17
33
  containerImageName: string;
18
- stopContainer: () => Promise<void>;
19
34
  };
20
35
  /**
21
- * Registers beforeAll / afterAll / afterEach hooks that handle the full Docker
22
- * lifecycle for a container test suite: - saves and restores the active Docker
23
- * context - builds the image from srcPath before all tests - removes the image
24
- * after all tests - stops and removes the container after each test
36
+ * Initializes a Docker test suite: builds the image at `srcPath` once, runs a
37
+ * container per test, and removes both afterwards.
38
+ *
39
+ * Every name it generates carries a random per-suite id, so two suites running
40
+ * concurrently — including two runs of the same file — never share an image tag
41
+ * or a container name, and neither one's cleanup can remove the other's.
42
+ *
43
+ * @param srcPath The build context to build the suite's image from.
44
+ * @param options Options for the suite.
45
+ * @returns The names the suite generated, for tests that need to address them.
25
46
  */
26
47
  export declare function initDockerSuite(srcPath: string, options?: InitDockerSuiteOptions): DockerSuiteContext;
27
48
  //# sourceMappingURL=init-docker-suite.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"init-docker-suite.d.ts","sourceRoot":"","sources":["../../src/docker/init-docker-suite.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,sBAAsB,GAAG;IACpC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,MAAM,OAAO,CAAC,IAAI,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,EAAE,MAAM,CAAC;CAC3B,CAAC;AAMF;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAC9B,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,sBAAsB,GAC9B,kBAAkB,CAgHpB"}
@@ -1,47 +1,110 @@
1
- import { dockerBuildxBuild, dockerContainerRm, dockerContextShow, dockerContextUse, dockerImageRm, } from "@ac-kit/cmd-docker";
1
+ import { dockerBuildxBuild, dockerContainerRm, dockerContainerRun, dockerImageRm, } from "@ac-kit/cmd-docker";
2
2
  import { getRandomBytes } from "@ac-kit/crypto-random";
3
- import { afterAll, afterEach, beforeAll } from "vitest";
3
+ import { afterAll, afterEach, beforeAll, beforeEach } from "vitest";
4
+ function randomId(byteLength) {
5
+ return Buffer.from(getRandomBytes(byteLength)).toString("hex");
6
+ }
4
7
  /**
5
- * Registers beforeAll / afterAll / afterEach hooks that handle the full Docker
6
- * lifecycle for a container test suite: - saves and restores the active Docker
7
- * context - builds the image from srcPath before all tests - removes the image
8
- * after all tests - stops and removes the container after each test
8
+ * Initializes a Docker test suite: builds the image at `srcPath` once, runs a
9
+ * container per test, and removes both afterwards.
10
+ *
11
+ * Every name it generates carries a random per-suite id, so two suites running
12
+ * concurrently — including two runs of the same file — never share an image tag
13
+ * or a container name, and neither one's cleanup can remove the other's.
14
+ *
15
+ * @param srcPath The build context to build the suite's image from.
16
+ * @param options Options for the suite.
17
+ * @returns The names the suite generated, for tests that need to address them.
9
18
  */
10
19
  export function initDockerSuite(srcPath, options) {
11
- const prefix = options?.containerNamePrefix ?? "test-";
12
- const contextName = options?.contextName ?? "default";
13
- const containerName = `${prefix}${Buffer.from(getRandomBytes(20)).toString("hex")}`;
14
- const containerImageName = `${containerName}-img`;
15
- let initialContext;
16
- async function stopContainer() {
17
- try {
18
- await dockerContainerRm([containerName], { force: true });
19
- }
20
- catch { }
20
+ const containerNamePrefix = options?.containerNamePrefix ?? "test-";
21
+ const suiteId = randomId(8);
22
+ const containerImageName = `${containerNamePrefix}${suiteId}-img`;
23
+ const commonOptions = { context: options?.context };
24
+ const startedContainerNames = [];
25
+ let imageBuildAttempted = false;
26
+ async function stopContainer(containerName) {
27
+ const index = startedContainerNames.indexOf(containerName);
28
+ if (index === -1) {
29
+ return;
30
+ }
31
+ // Untracked before the removal, so a removal that fails is reported once
32
+ // rather than retried until the drain loop gives up.
33
+ startedContainerNames.splice(index, 1);
34
+ await options?.onContainerStopping?.(containerName);
35
+ await dockerContainerRm([containerName], {
36
+ ...commonOptions,
37
+ force: true,
38
+ });
39
+ await options?.onContainerStopped?.(containerName);
40
+ }
41
+ async function stopAllContainers() {
42
+ while (startedContainerNames.length > 0) {
43
+ await stopContainer(startedContainerNames[0]);
44
+ }
45
+ }
46
+ async function removeImage() {
47
+ if (!imageBuildAttempted) {
48
+ return;
49
+ }
50
+ await dockerImageRm([containerImageName], {
51
+ ...commonOptions,
52
+ force: true,
53
+ });
21
54
  }
22
55
  beforeAll(async () => {
23
- initialContext = await dockerContextShow();
24
- await dockerContextUse(contextName);
25
- await stopContainer();
26
- try {
27
- await dockerImageRm([containerImageName], { force: true });
28
- }
29
- catch { }
30
- await dockerBuildxBuild(srcPath, { tags: [containerImageName] });
56
+ // Set before the build, not after: a build that tags the image and then
57
+ // fails still leaves one to remove.
58
+ imageBuildAttempted = true;
59
+ await dockerBuildxBuild(srcPath, {
60
+ ...commonOptions,
61
+ tags: [containerImageName],
62
+ });
31
63
  });
32
64
  afterAll(async () => {
33
- try {
34
- await dockerImageRm([containerImageName], { force: true });
65
+ // Every step runs even when an earlier one throws, or a container that
66
+ // refuses to die would strand the image for the rest of the machine.
67
+ const failures = [];
68
+ for (const step of [stopAllContainers, removeImage]) {
69
+ try {
70
+ await step();
71
+ }
72
+ catch (error) {
73
+ failures.push(error);
74
+ }
75
+ }
76
+ if (failures.length === 1) {
77
+ throw failures[0];
35
78
  }
36
- catch { }
37
- try {
38
- await dockerContextUse(initialContext);
79
+ if (failures.length > 1) {
80
+ throw new AggregateError(failures, "Docker suite cleanup failed");
39
81
  }
40
- catch { }
82
+ });
83
+ beforeEach(async () => {
84
+ if (options?.reuseContainerInstance && startedContainerNames.length > 0) {
85
+ return;
86
+ }
87
+ const containerName = `${containerNamePrefix}${suiteId}-${randomId(4)}`;
88
+ await options?.onContainerStarting?.(containerName);
89
+ await dockerContainerRun(containerImageName, {
90
+ ...options?.containerRunOptions?.(containerName),
91
+ ...commonOptions,
92
+ name: containerName,
93
+ detach: true,
94
+ });
95
+ // Tracked before the "started" hook so a hook that throws still leaves a
96
+ // container the teardown knows about.
97
+ startedContainerNames.push(containerName);
98
+ await options?.onContainerStarted?.(containerName);
41
99
  });
42
100
  afterEach(async () => {
43
- await stopContainer();
101
+ if (options?.reuseContainerInstance) {
102
+ return;
103
+ }
104
+ await stopAllContainers();
44
105
  });
45
- return { containerName, containerImageName, stopContainer };
106
+ return {
107
+ containerImageName,
108
+ };
46
109
  }
47
110
  //# sourceMappingURL=init-docker-suite.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"init-docker-suite.js","sourceRoot":"","sources":["../../src/docker/init-docker-suite.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,GACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAwBxD;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAC9B,OAAe,EACf,OAAgC;IAEhC,MAAM,MAAM,GAAG,OAAO,EAAE,mBAAmB,IAAI,OAAO,CAAC;IACvD,MAAM,WAAW,GAAG,OAAO,EAAE,WAAW,IAAI,SAAS,CAAC;IACtD,MAAM,aAAa,GAAG,GAAG,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ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GAAG,CAAC,EAAE,CAAC;YACzB,MAAM,IAAI,cAAc,CAAC,QAAQ,EAAE,6BAA6B,CAAC,CAAC;QACnE,CAAC;IACF,CAAC,CAAC,CAAC;IAEH,UAAU,CAAC,KAAK,IAAI,EAAE;QACrB,IAAI,OAAO,EAAE,sBAAsB,IAAI,qBAAqB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACzE,OAAO;QACR,CAAC;QAED,MAAM,aAAa,GAAG,GAAG,mBAAmB,GAAG,OAAO,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;QAExE,MAAM,OAAO,EAAE,mBAAmB,EAAE,CAAC,aAAa,CAAC,CAAC;QAEpD,MAAM,kBAAkB,CAAC,kBAAkB,EAAE;YAC5C,GAAG,OAAO,EAAE,mBAAmB,EAAE,CAAC,aAAa,CAAC;YAChD,GAAG,aAAa;YAChB,IAAI,EAAE,aAAa;YACnB,MAAM,EAAE,IAAI;SACZ,CAAC,CAAC;QAEH,yEAAyE;QACzE,sCAAsC;QACtC,qBAAqB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAE1C,MAAM,OAAO,EAAE,kBAAkB,EAAE,CAAC,aAAa,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,KAAK,IAAI,EAAE;QACpB,IAAI,OAAO,EAAE,sBAAsB,EAAE,CAAC;YACrC,OAAO;QACR,CAAC;QAED,MAAM,iBAAiB,EAAE,CAAC;IAC3B,CAAC,CAAC,CAAC;IAEH,OAAO;QACN,kBAAkB;KAClB,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ac-kit/integration-test-util",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Test helpers that drive and probe external services — Docker containers, TCP and TLS banner checks — from a package's integration tests.",
5
5
  "keywords": [
6
6
  "docker",
@@ -38,15 +38,16 @@
38
38
  "prepack": "yarn build"
39
39
  },
40
40
  "dependencies": {
41
- "@ac-kit/cmd-docker": "^0.1.0",
42
- "@ac-kit/core": "^0.1.0",
41
+ "@ac-kit/cmd-docker": "^0.2.0",
42
+ "@ac-kit/core": "^0.2.0",
43
43
  "@ac-kit/crypto-random": "^0.1.0",
44
- "@ac-kit/node": "^0.1.0"
44
+ "@ac-kit/node": "^0.2.0",
45
+ "type-fest": "^5.8.0"
45
46
  },
46
47
  "devDependencies": {
47
48
  "@ac-kit/tsconfig": "0.1.0",
48
49
  "@ac-kit/typedoc-config": "0.1.0",
49
- "@ac-kit/vitest-config": "0.1.0",
50
+ "@ac-kit/vitest-config": "0.1.1",
50
51
  "@types/node": "26.5.1",
51
52
  "@typescript/native": "typescript@7.0.2",
52
53
  "rimraf": "6.1.3",