@zukhruf/testing 0.3.36 → 0.3.38
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/README.md +40 -36
- package/dist/databases/clickhouse.d.ts +3 -3
- package/dist/databases/clickhouse.d.ts.map +1 -1
- package/dist/databases/clickhouse.js +2 -3
- package/dist/databases/clickhouse.js.map +1 -1
- package/dist/databases/database.d.ts +2 -2
- package/dist/databases/database.d.ts.map +1 -1
- package/dist/databases/mysql-family-server.d.ts.map +1 -1
- package/dist/databases/mysql-family-server.js +5 -4
- package/dist/databases/mysql-family-server.js.map +1 -1
- package/dist/databases/postgres.d.ts.map +1 -1
- package/dist/databases/postgres.js +11 -4
- package/dist/databases/postgres.js.map +1 -1
- package/dist/databases/sqlserver.d.ts.map +1 -1
- package/dist/databases/sqlserver.js +3 -5
- package/dist/databases/sqlserver.js.map +1 -1
- package/dist/databases/succeeded.d.ts +7 -0
- package/dist/databases/succeeded.d.ts.map +1 -0
- package/dist/databases/succeeded.js +11 -0
- package/dist/databases/succeeded.js.map +1 -0
- package/dist/docker/fixtures.d.ts +84 -0
- package/dist/docker/fixtures.d.ts.map +1 -0
- package/dist/docker/fixtures.js +265 -0
- package/dist/docker/fixtures.js.map +1 -0
- package/dist/docker/host.d.ts +3 -10
- package/dist/docker/host.d.ts.map +1 -1
- package/dist/docker/host.js +21 -41
- package/dist/docker/host.js.map +1 -1
- package/dist/docker/index.d.ts +2 -3
- package/dist/docker/index.d.ts.map +1 -1
- package/dist/docker/index.js +2 -3
- package/dist/docker/index.js.map +1 -1
- package/dist/docker/service-container.d.ts +20 -0
- package/dist/docker/service-container.d.ts.map +1 -0
- package/dist/docker/service-container.js +30 -0
- package/dist/docker/service-container.js.map +1 -0
- package/dist/docker/test-run.d.ts +13 -0
- package/dist/docker/test-run.d.ts.map +1 -1
- package/dist/docker/test-run.js +25 -0
- package/dist/docker/test-run.js.map +1 -1
- package/dist/scripts/docker-cleanup-worker.d.ts +21 -0
- package/dist/scripts/docker-cleanup-worker.d.ts.map +1 -0
- package/dist/scripts/docker-cleanup-worker.js +31 -0
- package/dist/scripts/docker-cleanup-worker.js.map +1 -0
- package/dist/scripts/docker-global-setup.d.ts +1 -1
- package/dist/scripts/docker-global-setup.d.ts.map +1 -1
- package/dist/scripts/docker-global-setup.js +88 -128
- package/dist/scripts/docker-global-setup.js.map +1 -1
- package/dist/scripts/run-cleanup.d.ts +17 -0
- package/dist/scripts/run-cleanup.d.ts.map +1 -0
- package/dist/scripts/run-cleanup.js +75 -0
- package/dist/scripts/run-cleanup.js.map +1 -0
- package/package.json +2 -1
- package/dist/docker/container.d.ts +0 -30
- package/dist/docker/container.d.ts.map +0 -1
- package/dist/docker/container.js +0 -53
- package/dist/docker/container.js.map +0 -1
- package/dist/docker/docker.d.ts +0 -74
- package/dist/docker/docker.d.ts.map +0 -1
- package/dist/docker/docker.js +0 -258
- package/dist/docker/docker.js.map +0 -1
- package/dist/docker/volume.d.ts +0 -9
- package/dist/docker/volume.d.ts.map +0 -1
- package/dist/docker/volume.js +0 -13
- package/dist/docker/volume.js.map +0 -1
package/README.md
CHANGED
|
@@ -8,21 +8,21 @@ The words in these documents have one meaning each. See the glossary in [CONTEXT
|
|
|
8
8
|
|
|
9
9
|
Each area has its own import path, so a test loads only the drivers it uses. The three drivers are optional peer dependencies: install the one an area names.
|
|
10
10
|
|
|
11
|
-
| Import | Gives
|
|
12
|
-
| ----------------------------- |
|
|
13
|
-
| `@zukhruf/testing/node` | Native `test`, `it`, `suite`, `describe` with `.each`
|
|
14
|
-
| `@zukhruf/testing/async` | `timebox`, `settleWithin`
|
|
15
|
-
| `@zukhruf/testing/docker` | `
|
|
16
|
-
| `@zukhruf/testing/postgres` | `Postgres`
|
|
17
|
-
| `@zukhruf/testing/mysql` | `Mysql`
|
|
18
|
-
| `@zukhruf/testing/mariadb` | `Mariadb`
|
|
19
|
-
| `@zukhruf/testing/sqlserver` | `SqlServer`, `SQL_SERVER_FULL_IMAGE`, `SQL_SERVER_EDGE_IMAGE`
|
|
20
|
-
| `@zukhruf/testing/clickhouse` | `ClickHouse`
|
|
21
|
-
| `@zukhruf/testing/sqlite` | `Sqlite`
|
|
22
|
-
| `@zukhruf/testing/duckdb` | `DuckDB`
|
|
23
|
-
| `@zukhruf/testing/bigquery` | `BigQuery`
|
|
24
|
-
| `@zukhruf/testing/http` | `HttpServer`
|
|
25
|
-
| `@zukhruf/testing/streams` | `StreamHarness`
|
|
11
|
+
| Import | Gives | Needs |
|
|
12
|
+
| ----------------------------- | ------------------------------------------------------------------ | ------------------------ |
|
|
13
|
+
| `@zukhruf/testing/node` | Native `test`, `it`, `suite`, `describe` with `.each` | |
|
|
14
|
+
| `@zukhruf/testing/async` | `timebox`, `settleWithin` | |
|
|
15
|
+
| `@zukhruf/testing/docker` | `DockerFixtures`, `ServiceContainer`, `DockerDirectory`, `TestRun` | a Docker engine |
|
|
16
|
+
| `@zukhruf/testing/postgres` | `Postgres` | a Docker engine |
|
|
17
|
+
| `@zukhruf/testing/mysql` | `Mysql` | a Docker engine |
|
|
18
|
+
| `@zukhruf/testing/mariadb` | `Mariadb` | a Docker engine |
|
|
19
|
+
| `@zukhruf/testing/sqlserver` | `SqlServer`, `SQL_SERVER_FULL_IMAGE`, `SQL_SERVER_EDGE_IMAGE` | a Docker engine, `mssql` |
|
|
20
|
+
| `@zukhruf/testing/clickhouse` | `ClickHouse` | a Docker engine |
|
|
21
|
+
| `@zukhruf/testing/sqlite` | `Sqlite` | |
|
|
22
|
+
| `@zukhruf/testing/duckdb` | `DuckDB` | `@duckdb/node-api` |
|
|
23
|
+
| `@zukhruf/testing/bigquery` | `BigQuery` | `@google-cloud/bigquery` |
|
|
24
|
+
| `@zukhruf/testing/http` | `HttpServer` | |
|
|
25
|
+
| `@zukhruf/testing/streams` | `StreamHarness` | |
|
|
26
26
|
|
|
27
27
|
## Parameterized tests
|
|
28
28
|
|
|
@@ -66,14 +66,14 @@ TAP, spec, simultaneous JUnit output, name filtering, skip/TODO reasons, failure
|
|
|
66
66
|
|
|
67
67
|
## Docker
|
|
68
68
|
|
|
69
|
-
A `
|
|
69
|
+
A `DockerFixtures` acquires containers, volumes and directories on one engine. The `environment` that you give it, such as `process.env`, selects the engine as the Docker CLI does: `DOCKER_HOST`, `DOCKER_CONTEXT`, or the current context in the Docker config directory. The `@zukhruf/docker` client sends the requests to the Engine API, so no Docker CLI is necessary. The engine is connected on the first acquisition, and every handle keeps that engine. It can be a local Unix socket, the named pipe of Docker Desktop on Windows (`npipe://`), or an SSH engine (`ssh://`).
|
|
70
70
|
|
|
71
|
-
A test that needs Docker has no skip option. When the engine does not answer, the first acquisition fails with "Docker is required for container-backed tests" and the
|
|
71
|
+
A test that needs Docker has no skip option. When the engine does not answer, the first acquisition fails with "Docker is required for container-backed tests" and the connection failure as the cause. Start Docker to run these tests.
|
|
72
72
|
|
|
73
73
|
```ts
|
|
74
|
-
import {
|
|
74
|
+
import { DockerFixtures } from '@zukhruf/testing/docker';
|
|
75
75
|
|
|
76
|
-
const docker = new
|
|
76
|
+
const docker = new DockerFixtures({ environment: process.env });
|
|
77
77
|
|
|
78
78
|
test('a holder in another container', async () => {
|
|
79
79
|
await using volume = await docker.volume();
|
|
@@ -84,7 +84,7 @@ test('a holder in another container', async () => {
|
|
|
84
84
|
command: ['node', '--eval', 'setInterval(() => {}, 1000)'],
|
|
85
85
|
});
|
|
86
86
|
await holder.kill();
|
|
87
|
-
const
|
|
87
|
+
const { exitCode, stdout } = await docker.run({
|
|
88
88
|
image: 'node:lts-alpine',
|
|
89
89
|
mounts: [{ source: volume.name, target: '/locks', readOnly: true }],
|
|
90
90
|
command: ['ls', '/locks'],
|
|
@@ -92,18 +92,22 @@ test('a holder in another container', async () => {
|
|
|
92
92
|
});
|
|
93
93
|
```
|
|
94
94
|
|
|
95
|
-
|
|
|
96
|
-
| ---------------- |
|
|
97
|
-
| `start(options)` | A container this process owns. It stays after it stops, so its logs remain, until disposal removes it.
|
|
98
|
-
| `serve(options)` | A dedicated server whose `internalPort` answers on `127.0.0.1` of this machine. Failure or disposal
|
|
99
|
-
| `reuse(options)` | One server per configuration on the engine, shared across processes and runs.
|
|
100
|
-
| `run(options)` | A container that runs to completion.
|
|
101
|
-
| `volume()` | A named volume.
|
|
102
|
-
| `directory()` | A directory on the engine's host, for bind mounts. It has `mkdir`, `writeFile`, `readFile`, `chmod` and `symlink`.
|
|
95
|
+
| Member | Gives | Returns |
|
|
96
|
+
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- |
|
|
97
|
+
| `start(options)` | A container this process owns. It stays after it stops, so its logs remain, until disposal removes it. | `OwnedContainer` |
|
|
98
|
+
| `serve(options)` | A dedicated server whose `internalPort` answers on `127.0.0.1` of this machine. Failure or disposal removes it. | `ServiceContainer` |
|
|
99
|
+
| `reuse(options)` | One server per configuration on the engine, shared across processes and runs. | `ServiceContainer` |
|
|
100
|
+
| `run(options)` | A container that runs to completion. It gives the output and the exit code, and removes the container. A non-zero exit code does not throw. | `ExecResult` |
|
|
101
|
+
| `volume()` | A named volume. | `OwnedVolume` |
|
|
102
|
+
| `directory()` | A directory on the engine's host, for bind mounts. It has `mkdir`, `writeFile`, `readFile`, `chmod` and `symlink`. | `DockerDirectory` |
|
|
103
|
+
| `client()` | The `@zukhruf/docker` client of the engine, for each other Engine API call, such as `info()` or `containers.find(id)`. | `Docker` (from `@zukhruf/docker`) |
|
|
104
|
+
| `defaults` | The default `resources` and the run's `labels`. | |
|
|
103
105
|
|
|
104
|
-
Options: `image`, `command`, `name`, `hostname`, `env`, `labels`, `mounts`, `tmpfs`, `ipcHost`, `memory` (default `1g`), `cpus` (default `1`), `memorySwappiness`. `serve` and `reuse` also take `internalPort` and `healthy`, a function that throws until the server is ready; it runs on every acquisition. Use `timebox` for polling inside it.
|
|
106
|
+
Options: `image`, `command`, `name`, `hostname`, `env`, `labels`, `mounts`, `tmpfs`, `ipcHost`, `memory` (default `1g`), `cpus` (default `1`), `memorySwappiness`. `serve` and `reuse` also take `internalPort` and `healthy`, a function that throws until the server is ready; it runs on every acquisition. Use `timebox` for polling inside it. When the engine does not have the image, the acquisition pulls it, as `docker run` does.
|
|
105
107
|
|
|
106
|
-
|
|
108
|
+
`OwnedContainer`, `OwnedVolume`, `ExecResult` and `Docker` are types of `@zukhruf/docker`. A container has `id`, `exec({ Cmd })`, `logs()`, `kill(signal)` and `inspect()`. `exec` gives `exitCode`, `stdout`, `stderr` and `output`, and it does not throw for a non-zero exit code. The text keeps its last newline. Disposal removes the container with its anonymous volumes.
|
|
109
|
+
|
|
110
|
+
A `ServiceContainer` has `container`, `host` and `port`. On an SSH engine, the port is a local forward that belongs to the acquiring process. `disconnect()` closes that forward and leaves the container running for its other users. If the forward ended before, for example because the SSH connection died, `disconnect()` rejects with what ssh printed. `cleanup()` and disposal also remove the container of a dedicated server. When the removal fails too, `cleanup()` rejects with a `SuppressedError` that holds both errors. Nothing is written to stderr. A probe in `healthy` gets the `ServiceContainer`: call `container.exec(...)` on it, and do not destructure `exec`.
|
|
107
111
|
|
|
108
112
|
### Shared servers
|
|
109
113
|
|
|
@@ -116,7 +120,7 @@ docker ps -a --filter label=dev.zukhruf.testing.shared=1
|
|
|
116
120
|
docker stop <container-id>
|
|
117
121
|
```
|
|
118
122
|
|
|
119
|
-
|
|
123
|
+
The engine removes a server when it stops, so stopping also removes it. The image tag is part of the configuration: stop the server to pick up a newer image behind the same tag.
|
|
120
124
|
|
|
121
125
|
## A killed run
|
|
122
126
|
|
|
@@ -136,13 +140,13 @@ Then give the file to `node --test`. The value is a path relative to the working
|
|
|
136
140
|
node --test --test-force-exit --test-global-setup=src/testing/docker-global-setup.ts "src/**/*.test.ts"
|
|
137
141
|
```
|
|
138
142
|
|
|
139
|
-
The global setup sets `ZUKHRUF_TESTING_RUN_ID` and `ZUKHRUF_TESTING_RUN_DIR` for the test processes. A `
|
|
143
|
+
The global setup sets `ZUKHRUF_TESTING_RUN_ID` and `ZUKHRUF_TESTING_RUN_DIR` for the test processes. A `DockerFixtures` reads them from its `environment` and labels what it creates with the run. It records SSH forwards and host directories in the run's directory. It also writes a process record for its test process, and for each SSH command that it starts, while that command runs. While it asks the engine to create a container, it writes a creating record.
|
|
140
144
|
|
|
141
|
-
The global teardown removes the labeled containers with their anonymous volumes, the labeled volumes and the recorded paths. It never removes shared servers. The teardown is synchronous, because Node does not wait for an asynchronous teardown under `--test-force-exit`. When every recorded process has ended, the teardown deletes the run's records. A recorded process that still runs can still create a container
|
|
145
|
+
The global teardown removes the labeled containers with their anonymous volumes, the labeled volumes and the recorded paths. It never removes shared servers. The teardown is synchronous, because Node does not wait for an asynchronous teardown under `--test-force-exit`. When every recorded process has ended, the teardown deletes the run's records. A recorded process that still runs can still create a container. The engine can also finish a create after the test process that sent it was killed. Then the teardown keeps the records, and a later run removes what is left after that process ends.
|
|
142
146
|
|
|
143
147
|
If cleanup fails, for example because the engine is unreachable, the global teardown prints the error, keeps the run's records, and sets exit code 1. The next run on the same engine removes what the run left, from any project of this user. This is recovery. Recovery does not touch a run while its runner or one of its recorded processes lives. The records are in `$XDG_STATE_HOME/zukhruf-testing/docker-runs` (`~/.local/state/zukhruf-testing/docker-runs` by default). Do not delete a record to hide a cleanup failure.
|
|
144
148
|
|
|
145
|
-
The global setup
|
|
149
|
+
The global setup selects the engine as the Docker CLI does, through `@zukhruf/docker`, so the Docker CLI is not necessary. It calls the engine only when a dead run on that engine has records to sweep.
|
|
146
150
|
|
|
147
151
|
On an SSH engine, run one test file at a time with `--test-concurrency=1` if the engine cannot take more. An SSH forward runs `cat` in a remote shell, so the SSH user needs a shell on the engine's host. The forward ends when the process that opened it ends, also when that process is killed.
|
|
148
152
|
|
|
@@ -150,7 +154,7 @@ To pass the run to another container API, spread `docker.defaults`: it holds the
|
|
|
150
154
|
|
|
151
155
|
## Databases
|
|
152
156
|
|
|
153
|
-
`Postgres`, `Mysql`, `Mariadb` and `
|
|
157
|
+
`Postgres`, `Mysql`, `Mariadb`, `SqlServer` and `ClickHouse` take the `docker`, a `DockerFixtures`, to run on. Each `database()` call creates a fresh database on a shared server; disposal drops it. `start()` creates a dedicated server; disposal stops it.
|
|
154
158
|
|
|
155
159
|
```ts
|
|
156
160
|
import { Postgres } from '@zukhruf/testing/postgres';
|
|
@@ -163,7 +167,7 @@ test('stores a record', async () => {
|
|
|
163
167
|
});
|
|
164
168
|
```
|
|
165
169
|
|
|
166
|
-
The handle has `connectionString`, `host`, `port`, `user`, `password`, `database`, `image` and `containerId`. `Mysql` and `Mariadb` handles also have `query(sql)`. Without an image, `Mysql` runs `mysql:lts` and `Mariadb` runs `mariadb:lts`. MariaDB 11 and later have no `mysql` client, so use `Mariadb` for a MariaDB image. A `Mariadb` connection string starts with `mariadb://`, because the `mariadb` driver accepts no other scheme. Without an image, `SqlServer` picks Azure SQL Edge on an ARM engine and SQL Server 2022 elsewhere. `ClickHouse` takes an explicit `image
|
|
170
|
+
The handle has `connectionString`, `host`, `port`, `user`, `password`, `database`, `image` and `containerId`. `Mysql` and `Mariadb` handles also have `query(sql)`. Without an image, `Mysql` runs `mysql:lts` and `Mariadb` runs `mariadb:lts`. MariaDB 11 and later have no `mysql` client, so use `Mariadb` for a MariaDB image. A `Mariadb` connection string starts with `mariadb://`, because the `mariadb` driver accepts no other scheme. Without an image, `SqlServer` picks Azure SQL Edge on an ARM engine and SQL Server 2022 elsewhere. `ClickHouse` takes an explicit `image`, and its `start()` gives a `ServiceContainer` of a dedicated server, so a test can create server-wide users and functions.
|
|
167
171
|
|
|
168
172
|
`Sqlite` creates a file-backed database in a temporary directory, with a native `DatabaseSync` connection. Disposal closes the connection and removes the directory, including WAL files. `writeLock(path, durationMs)` holds a write lock from another process, which releases it after `durationMs`, even while the caller blocks in a synchronous write.
|
|
169
173
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { DockerFixtures } from '../docker/fixtures.ts';
|
|
2
|
+
import type { ServiceContainer } from '../docker/service-container.ts';
|
|
3
3
|
/** Each start owns a dedicated ClickHouse server and its disposable container. */
|
|
4
4
|
export declare class ClickHouse {
|
|
5
5
|
#private;
|
|
6
6
|
constructor({ docker, image }: {
|
|
7
|
-
docker:
|
|
7
|
+
docker: DockerFixtures;
|
|
8
8
|
image: string;
|
|
9
9
|
});
|
|
10
10
|
start(): Promise<ServiceContainer>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clickhouse.d.ts","sourceRoot":"","sources":["../../src/databases/clickhouse.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"clickhouse.d.ts","sourceRoot":"","sources":["../../src/databases/clickhouse.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAGvE,kFAAkF;AAClF,qBAAa,UAAU;;gBAIT,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE;QAAE,MAAM,EAAE,cAAc,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE;IAKxE,KAAK,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAcnC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { timebox } from "../async/timebox.js";
|
|
2
|
+
import { succeeded } from "./succeeded.js";
|
|
2
3
|
/** Each start owns a dedicated ClickHouse server and its disposable container. */
|
|
3
4
|
export class ClickHouse {
|
|
4
5
|
#docker;
|
|
@@ -13,9 +14,7 @@ export class ClickHouse {
|
|
|
13
14
|
internalPort: 8123,
|
|
14
15
|
memory: '2g',
|
|
15
16
|
env: { CLICKHOUSE_SKIP_USER_SETUP: '1' },
|
|
16
|
-
healthy: (
|
|
17
|
-
maxRetryTime: 60_000,
|
|
18
|
-
}),
|
|
17
|
+
healthy: (service) => timebox(() => succeeded(service, ['clickhouse-client', '--query', 'SELECT 1']), { maxRetryTime: 60_000 }),
|
|
19
18
|
});
|
|
20
19
|
}
|
|
21
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clickhouse.js","sourceRoot":"","sources":["../../src/databases/clickhouse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"clickhouse.js","sourceRoot":"","sources":["../../src/databases/clickhouse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAG9C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,kFAAkF;AAClF,MAAM,OAAO,UAAU;IACZ,OAAO,CAAiB;IACxB,MAAM,CAAS;IAExB,YAAY,EAAE,MAAM,EAAE,KAAK,EAA6C;QACtE,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;IAED,KAAK;QACH,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;YACxB,KAAK,EAAE,IAAI,CAAC,MAAM;YAClB,YAAY,EAAE,IAAI;YAClB,MAAM,EAAE,IAAI;YACZ,GAAG,EAAE,EAAE,0BAA0B,EAAE,GAAG,EAAE;YACxC,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,CACnB,OAAO,CACL,GAAG,EAAE,CACH,SAAS,CAAC,OAAO,EAAE,CAAC,mBAAmB,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,EAClE,EAAE,YAAY,EAAE,MAAM,EAAE,CACzB;SACJ,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { DockerFixtures } from '../docker/fixtures.ts';
|
|
2
2
|
/** Connection and disposal for one server-backed database. */
|
|
3
3
|
export interface Database extends AsyncDisposable {
|
|
4
4
|
connectionString: string;
|
|
@@ -14,7 +14,7 @@ export interface Database extends AsyncDisposable {
|
|
|
14
14
|
}
|
|
15
15
|
export interface DatabaseOptions {
|
|
16
16
|
/** The engine the server runs on, with the test run that owns it. */
|
|
17
|
-
docker:
|
|
17
|
+
docker: DockerFixtures;
|
|
18
18
|
labels?: Record<string, string>;
|
|
19
19
|
image?: string;
|
|
20
20
|
password?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../src/databases/database.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../src/databases/database.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,8DAA8D;AAC9D,MAAM,WAAW,QAAS,SAAQ,eAAe;IAC/C,gBAAgB,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,oFAAoF;IACpF,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,eAAe;IAC9B,qEAAqE;IACrE,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mysql-family-server.d.ts","sourceRoot":"","sources":["../../src/databases/mysql-family-server.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"mysql-family-server.d.ts","sourceRoot":"","sources":["../../src/databases/mysql-family-server.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAG/D,MAAM,WAAW,mBAAoB,SAAQ,QAAQ;IACnD,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC;CAClE;AAKD;;;;;GAKG;AACH,8BAAsB,iBAAiB;;IAIrC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAC3C,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAC3C,SAAS,CAAC,QAAQ,CAAC,WAAW,CAC5B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GACf,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEb,EACV,MAAM,EACN,KAAK,EACL,QAAyB,EACzB,QAAgB,EAChB,MAAM,GACP,EAAE,eAAe,GAAG;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE;IAKtC,mEAAmE;IAC7D,QAAQ,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAoB9C,wEAAwE;IAClE,KAAK,IAAI,OAAO,CAAC,mBAAmB,CAAC;CA6G5C"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
2
|
import { timebox } from "../async/timebox.js";
|
|
3
|
+
import { succeeded } from "./succeeded.js";
|
|
3
4
|
/** The image creates only root, from the root password in its environment. */
|
|
4
5
|
const user = 'root';
|
|
5
6
|
/**
|
|
@@ -41,7 +42,7 @@ export class MysqlFamilyServer {
|
|
|
41
42
|
}
|
|
42
43
|
#sql(container, sql) {
|
|
43
44
|
const { password } = this.#options;
|
|
44
|
-
return container
|
|
45
|
+
return succeeded(container, [
|
|
45
46
|
this.client,
|
|
46
47
|
`-u${user}`,
|
|
47
48
|
`-p${password}`,
|
|
@@ -51,7 +52,7 @@ export class MysqlFamilyServer {
|
|
|
51
52
|
}
|
|
52
53
|
async #query(container, database, sql) {
|
|
53
54
|
const { password } = this.#options;
|
|
54
|
-
const
|
|
55
|
+
const stdout = await succeeded(container, [
|
|
55
56
|
this.client,
|
|
56
57
|
`-u${user}`,
|
|
57
58
|
`-p${password}`,
|
|
@@ -95,7 +96,7 @@ export class MysqlFamilyServer {
|
|
|
95
96
|
#ready(container) {
|
|
96
97
|
const { password } = this.#options;
|
|
97
98
|
// TCP excludes the entrypoint's temporary, socket-only initialization server.
|
|
98
|
-
return timebox(() => container
|
|
99
|
+
return timebox(() => succeeded(container, [
|
|
99
100
|
this.client,
|
|
100
101
|
'-h',
|
|
101
102
|
'127.0.0.1',
|
|
@@ -113,7 +114,7 @@ export class MysqlFamilyServer {
|
|
|
113
114
|
user,
|
|
114
115
|
password,
|
|
115
116
|
database,
|
|
116
|
-
containerId: container.
|
|
117
|
+
containerId: container.container.id,
|
|
117
118
|
host: container.host,
|
|
118
119
|
port: container.port,
|
|
119
120
|
query: (sql) => this.#query(container, database, sql),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mysql-family-server.js","sourceRoot":"","sources":["../../src/databases/mysql-family-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"mysql-family-server.js","sourceRoot":"","sources":["../../src/databases/mysql-family-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAI9C,OAAO,EAAE,S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AE,CACzB,CAAC;IACJ,CAAC;IAED,OAAO,CACL,SAA2B,EAC3B,QAAgB,EAChB,OAA4B;QAE5B,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC1C,OAAO;YACL,gBAAgB,EAAE,GAAG,IAAI,CAAC,MAAM,MAAM,IAAI,IAAI,QAAQ,IAAI,SAAS,CAAC,IAAI,IAAI,SAAS,CAAC,IAAI,IAAI,QAAQ,EAAE;YACxG,KAAK;YACL,IAAI;YACJ,QAAQ;YACR,QAAQ;YACR,WAAW,EAAE,SAAS,CAAC,SAAS,CAAC,EAAE;YACnC,IAAI,EAAE,SAAS,CAAC,IAAI;YACpB,IAAI,EAAE,SAAS,CAAC,IAAI;YACpB,KAAK,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,QAAQ,EAAE,GAAG,CAAC;YACrD,OAAO;YACP,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,OAAO;SAC/B,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postgres.d.ts","sourceRoot":"","sources":["../../src/databases/postgres.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"postgres.d.ts","sourceRoot":"","sources":["../../src/databases/postgres.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAG/D,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAE/D,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,qFAAqF;AACrF,qBAAa,QAAQ;;gBAIP,EACV,MAAM,EACN,KAA4B,EAC5B,QAAyB,EACzB,QAAmB,EACnB,IAAiB,EACjB,MAAM,GACP,EAAE,eAAe;IAKlB,mEAAmE;IAC7D,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC;IAoBnC,wEAAwE;IAClE,KAAK,IAAI,OAAO,CAAC,QAAQ,CAAC;CAqFjC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
2
|
import { timebox } from "../async/timebox.js";
|
|
3
|
+
import { succeeded } from "./succeeded.js";
|
|
3
4
|
/** PostgreSQL test configuration. Each acquisition returns an independent handle. */
|
|
4
5
|
export class Postgres {
|
|
5
6
|
#docker;
|
|
@@ -33,7 +34,7 @@ export class Postgres {
|
|
|
33
34
|
return this.#handle(container, database, () => container.cleanup());
|
|
34
35
|
}
|
|
35
36
|
#sql(container, sql) {
|
|
36
|
-
return container
|
|
37
|
+
return succeeded(container, [
|
|
37
38
|
'psql',
|
|
38
39
|
'-U',
|
|
39
40
|
this.#options.user,
|
|
@@ -63,8 +64,14 @@ export class Postgres {
|
|
|
63
64
|
const { user } = this.#options;
|
|
64
65
|
// TCP excludes PostgreSQL's temporary, socket-only initialization server.
|
|
65
66
|
return timebox(async () => {
|
|
66
|
-
await container
|
|
67
|
-
|
|
67
|
+
await succeeded(container, [
|
|
68
|
+
'pg_isready',
|
|
69
|
+
'-h',
|
|
70
|
+
'127.0.0.1',
|
|
71
|
+
'-U',
|
|
72
|
+
user,
|
|
73
|
+
]);
|
|
74
|
+
await succeeded(container, [
|
|
68
75
|
'psql',
|
|
69
76
|
'-h',
|
|
70
77
|
'127.0.0.1',
|
|
@@ -85,7 +92,7 @@ export class Postgres {
|
|
|
85
92
|
user,
|
|
86
93
|
password,
|
|
87
94
|
database,
|
|
88
|
-
containerId: container.
|
|
95
|
+
containerId: container.container.id,
|
|
89
96
|
host: container.host,
|
|
90
97
|
port: container.port,
|
|
91
98
|
cleanup,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postgres.js","sourceRoot":"","sources":["../../src/databases/postgres.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"postgres.js","sourceRoot":"","sources":["../../src/databases/postgres.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAI9C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAQ3C,qFAAqF;AACrF,MAAM,OAAO,QAAQ;IACV,OAAO,CAAiB;IACxB,QAAQ,CAAC;IAElB,YAAY,EACV,MAAM,EACN,KAAK,GAAG,oBAAoB,EAC5B,QAAQ,GAAG,cAAc,EACzB,QAAQ,GAAG,QAAQ,EACnB,IAAI,GAAG,UAAU,EACjB,MAAM,GACU;QAChB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,QAAQ,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAC9D,CAAC;IAED,mEAAmE;IACnE,KAAK,CAAC,QAAQ;QACZ,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAC3D,MAAM,QAAQ,GAAG,QAAQ,UAAU,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC;QAC5D,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,mBAAmB,QAAQ,EAAE,CAAC,CAAC;QAC5D,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,SAAS,CAAC,UAAU,EAAE,CAAC;YAC7B,MAAM,KAAK,CAAC;QACd,CAAC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS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OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAE/D,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAE/D,eAAO,MAAM,qBAAqB,+CACY,CAAC;AAC/C,eAAO,MAAM,qBAAqB,4CAA4C,CAAC;AAE/E,4FAA4F;AAC5F,qBAAa,SAAS;;
|
|
1
|
+
{"version":3,"file":"sqlserver.d.ts","sourceRoot":"","sources":["../../src/databases/sqlserver.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAE/D,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAE/D,eAAO,MAAM,qBAAqB,+CACY,CAAC;AAC/C,eAAO,MAAM,qBAAqB,4CAA4C,CAAC;AAE/E,4FAA4F;AAC5F,qBAAa,SAAS;;gBAWR,EACV,MAAM,EACN,KAAK,EACL,QAA+B,EAC/B,QAAmB,EACnB,MAAM,GACP,EAAE,eAAe;IAKlB,mEAAmE;IAC7D,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC;IAmBnC,wEAAwE;IAClE,KAAK,IAAI,OAAO,CAAC,QAAQ,CAAC;CA+GjC"}
|
|
@@ -11,10 +11,8 @@ export class SqlServer {
|
|
|
11
11
|
#image = pMemoize(async () => {
|
|
12
12
|
if (this.#options.image)
|
|
13
13
|
return this.#options.image;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const { architecture } = await this.#docker.info();
|
|
17
|
-
return ['arm64', 'aarch64'].includes(architecture)
|
|
14
|
+
const { Architecture } = await (await this.#docker.client()).info();
|
|
15
|
+
return ['arm64', 'aarch64'].includes(Architecture ?? '')
|
|
18
16
|
? SQL_SERVER_EDGE_IMAGE
|
|
19
17
|
: SQL_SERVER_FULL_IMAGE;
|
|
20
18
|
});
|
|
@@ -123,7 +121,7 @@ export class SqlServer {
|
|
|
123
121
|
user: 'sa',
|
|
124
122
|
password,
|
|
125
123
|
database,
|
|
126
|
-
containerId: container.
|
|
124
|
+
containerId: container.container.id,
|
|
127
125
|
host: container.host,
|
|
128
126
|
port: container.port,
|
|
129
127
|
cleanup,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlserver.js","sourceRoot":"","sources":["../../src/databases/sqlserver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,GAAG,MAAM,OAAO,CAAC;AACxB,OAAO,QAAQ,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAO9C,MAAM,CAAC,MAAM,qBAAqB,GAChC,4CAA4C,CAAC;AAC/C,MAAM,CAAC,MAAM,qBAAqB,GAAG,yCAAyC,CAAC;AAE/E,4FAA4F;AAC5F,MAAM,OAAO,SAAS;IACX,OAAO,
|
|
1
|
+
{"version":3,"file":"sqlserver.js","sourceRoot":"","sources":["../../src/databases/sqlserver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,GAAG,MAAM,OAAO,CAAC;AACxB,OAAO,QAAQ,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAO9C,MAAM,CAAC,MAAM,qBAAqB,GAChC,4CAA4C,CAAC;AAC/C,MAAM,CAAC,MAAM,qBAAqB,GAAG,yCAAyC,CAAC;AAE/E,4FAA4F;AAC5F,MAAM,OAAO,SAAS;IACX,OAAO,CAAiB;IACxB,QAAQ,CAAC;IACT,MAAM,GAAG,QAAQ,CAAC,KAAK,IAAqB,EAAE;QACrD,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK;YAAE,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;QACpD,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC,MAAM,IAAI,C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E,MAAM;gBAC7B,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC;aACtE;YACD,YAAY,EAAE,IAAI;YAClB,KAAK,EAAE,CAAC,qCAAqC,CAAC;YAC9C,MAAM,EAAE,IAAI;YACZ,gBAAgB,EAAE,CAAC;YACnB,OAAO,EAAE,CAAC,SAAS,EAAE,EAAE,CACrB,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC;SAClE,CAAC,CAAC;IACL,CAAC;IAED,OAAO,CACL,SAA2B,EAC3B,KAAa,EACb,QAAgB,EAChB,OAA4B;QAE5B,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC;QACnC,OAAO;YACL,gBAAgB,EAAE,IAAI,CAAC,iBAAiB,CAAC,SAAS,EAAE,QAAQ,CAAC;YAC7D,KAAK;YACL,IAAI,EAAE,IAAI;YACV,QAAQ;YACR,QAAQ;YACR,WAAW,EAAE,SAAS,CAAC,SAAS,CAAC,EAAE;YACnC,IAAI,EAAE,SAAS,CAAC,IAAI;YACpB,IAAI,EAAE,SAAS,CAAC,IAAI;YACpB,OAAO;YACP,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,OAAO;SAC/B,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ServiceContainer } from '../docker/service-container.ts';
|
|
2
|
+
/**
|
|
3
|
+
* Runs `command` in the server's container and gives its standard output.
|
|
4
|
+
* A non-zero exit code rejects with the output of the command.
|
|
5
|
+
*/
|
|
6
|
+
export declare function succeeded({ container }: ServiceContainer, command: string[]): Promise<string>;
|
|
7
|
+
//# sourceMappingURL=succeeded.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"succeeded.d.ts","sourceRoot":"","sources":["../../src/databases/succeeded.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAEvE;;;GAGG;AACH,wBAAsB,SAAS,CAC7B,EAAE,SAAS,EAAE,EAAE,gBAAgB,EAC/B,OAAO,EAAE,MAAM,EAAE,GAChB,OAAO,CAAC,MAAM,CAAC,CAKjB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runs `command` in the server's container and gives its standard output.
|
|
3
|
+
* A non-zero exit code rejects with the output of the command.
|
|
4
|
+
*/
|
|
5
|
+
export async function succeeded({ container }, command) {
|
|
6
|
+
const { exitCode, stdout, output } = await container.exec({ Cmd: command });
|
|
7
|
+
if (exitCode !== 0)
|
|
8
|
+
throw new Error(`${command[0]} exited with ${exitCode}: ${output}`);
|
|
9
|
+
return stdout;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=succeeded.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"succeeded.js","sourceRoot":"","sources":["../../src/databases/succeeded.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,EAAE,SAAS,EAAoB,EAC/B,OAAiB;IAEjB,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,SAAS,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;IAC5E,IAAI,QAAQ,KAAK,CAAC;QAChB,MAAM,IAAI,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,gBAAgB,QAAQ,KAAK,MAAM,EAAE,CAAC,CAAC;IACtE,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { Docker, type Environment, type ExecResult, type OwnedContainer, type OwnedVolume } from '@zukhruf/docker';
|
|
2
|
+
import { DockerDirectory } from './directory.ts';
|
|
3
|
+
import { ServiceContainer } from './service-container.ts';
|
|
4
|
+
/** Marks a server that `reuse()` shares across processes and runs. */
|
|
5
|
+
export declare const SHARED_SERVER_LABEL = "dev.zukhruf.testing.shared";
|
|
6
|
+
/** The fingerprint of a shared server's configuration. */
|
|
7
|
+
export declare const CONFIG_LABEL = "dev.zukhruf.testing.config";
|
|
8
|
+
/** A volume or a path on the engine's host, mounted into a container. */
|
|
9
|
+
export interface Mount {
|
|
10
|
+
/** A volume's name, or an absolute path on the engine's host. */
|
|
11
|
+
source: string;
|
|
12
|
+
target: string;
|
|
13
|
+
readOnly?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface ContainerOptions {
|
|
16
|
+
image: string;
|
|
17
|
+
/** Replaces the image's command. */
|
|
18
|
+
command?: string[];
|
|
19
|
+
/** A dedicated container gets a generated name; a reused server's name comes from its configuration. */
|
|
20
|
+
name?: string;
|
|
21
|
+
hostname?: string;
|
|
22
|
+
env?: Record<string, string>;
|
|
23
|
+
labels?: Record<string, string> | undefined;
|
|
24
|
+
mounts?: Mount[];
|
|
25
|
+
/** `<path>[:<options>]`, as `docker run --tmpfs` takes it. */
|
|
26
|
+
tmpfs?: string[];
|
|
27
|
+
ipcHost?: boolean;
|
|
28
|
+
/** A size in the Docker CLI's binary units, such as `512m` or `1g`. */
|
|
29
|
+
memory?: string;
|
|
30
|
+
cpus?: number;
|
|
31
|
+
memorySwappiness?: number;
|
|
32
|
+
}
|
|
33
|
+
export interface ServiceOptions extends ContainerOptions {
|
|
34
|
+
/** The container's port that answers on 127.0.0.1 of this machine. */
|
|
35
|
+
internalPort: number;
|
|
36
|
+
/** Runs on every acquisition. Throw until ready, using timebox for polling. */
|
|
37
|
+
healthy?: (service: ServiceContainer) => unknown;
|
|
38
|
+
}
|
|
39
|
+
export interface DockerFixturesOptions {
|
|
40
|
+
/** The environment of this process, such as `process.env`: it selects the engine and the run. */
|
|
41
|
+
environment: Environment;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Container fixtures on the engine that `environment` selects. The engine is
|
|
45
|
+
* connected on the first acquisition and kept: handles keep the engine they
|
|
46
|
+
* were made on. Docker owns cross-process coordination; this instance holds
|
|
47
|
+
* no server cache.
|
|
48
|
+
*/
|
|
49
|
+
export declare class DockerFixtures {
|
|
50
|
+
#private;
|
|
51
|
+
constructor({ environment }: DockerFixturesOptions);
|
|
52
|
+
/**
|
|
53
|
+
* Defaults for disposable test containers, including external launchers.
|
|
54
|
+
* A launcher creates with these labels and no acquisition of this class:
|
|
55
|
+
* the read records this process, so the global teardown sweeps the run.
|
|
56
|
+
*/
|
|
57
|
+
get defaults(): {
|
|
58
|
+
resources: {
|
|
59
|
+
memory: string;
|
|
60
|
+
cpus: number;
|
|
61
|
+
};
|
|
62
|
+
labels: Record<string, string>;
|
|
63
|
+
};
|
|
64
|
+
/** The client of the engine that this instance's handles are on. */
|
|
65
|
+
client(): Promise<Docker>;
|
|
66
|
+
/** A fixture directory on the engine's host. */
|
|
67
|
+
directory(): Promise<DockerDirectory>;
|
|
68
|
+
/** Creates a named volume. Its run's cleanup removes it if this process dies first. */
|
|
69
|
+
volume(): Promise<OwnedVolume>;
|
|
70
|
+
/** Starts a container this process owns. It stays after it stops, until disposal removes it. */
|
|
71
|
+
start(options: ContainerOptions): Promise<OwnedContainer>;
|
|
72
|
+
/** Starts a dedicated server. Failure or disposal removes it. */
|
|
73
|
+
serve(options: ServiceOptions): Promise<ServiceContainer>;
|
|
74
|
+
/**
|
|
75
|
+
* Reuse one server per configuration on this engine, across processes and
|
|
76
|
+
* runs. Docker reserves the name atomically. Readiness failure leaves it
|
|
77
|
+
* running. Disposal closes only the forward; the server keeps running for
|
|
78
|
+
* its other users.
|
|
79
|
+
*/
|
|
80
|
+
reuse(options: ServiceOptions): Promise<ServiceContainer>;
|
|
81
|
+
/** Runs a container to completion and gives its output and exit code. The container is removed afterwards. */
|
|
82
|
+
run(options: ContainerOptions): Promise<ExecResult>;
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=fixtures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../src/docker/fixtures.ts"],"names":[],"mappings":"AAIA,OAAO,EAGL,MAAM,EAEN,KAAK,WAAW,EAChB,KAAK,UAAU,EAEf,KAAK,cAAc,EACnB,KAAK,WAAW,EACjB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAG1D,sEAAsE;AACtE,eAAO,MAAM,mBAAmB,+BAA+B,CAAC;AAChE,0DAA0D;AAC1D,eAAO,MAAM,YAAY,+BAA+B,CAAC;AAEzD,yEAAyE;AACzE,MAAM,WAAW,KAAK;IACpB,iEAAiE;IACjE,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,wGAAwG;IACxG,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;IAC5C,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;IACjB,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE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