@impz/testing 5.0.0 → 6.0.1
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 +8 -17
- package/dist/index.js +670 -527
- package/package.json +45 -23
package/README.md
CHANGED
|
@@ -30,7 +30,10 @@ test('it creates an imp', async () => {
|
|
|
30
30
|
|
|
31
31
|
`startTestImpd(options)` takes:
|
|
32
32
|
|
|
33
|
-
- `env`: impd settings, as the `IMP_*` variables impd reads at start.
|
|
33
|
+
- `env`: impd settings, as the `IMP_*` variables impd reads at start. A setting that turns on HTTPS
|
|
34
|
+
or OpenTelemetry export needs the package that impd loads for it, which the package lists as an
|
|
35
|
+
optional peer dependency: add `acme-client` or the `@opentelemetry/*` exporters to your dev
|
|
36
|
+
dependencies.
|
|
34
37
|
- `onLog`: a callback for each line impd logs. impd writes nothing to stderr.
|
|
35
38
|
|
|
36
39
|
It returns:
|
|
@@ -76,22 +79,10 @@ await forward.listening;
|
|
|
76
79
|
const stream = await guest.connect(4000);
|
|
77
80
|
```
|
|
78
81
|
|
|
79
|
-
The guest
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
the process reads.
|
|
84
|
-
- A process that resets its connection drops the relay with no EOF.
|
|
85
|
-
- A forward that asks for port 0 gets a free port, and a second forward on a port in use fails with
|
|
86
|
-
`LISTEN_FAILED`.
|
|
87
|
-
- When the imp sleeps or goes away, the guest drops its connections, so a forward ends as `lost`. A
|
|
88
|
-
forward opened after the wake listens on the guest again.
|
|
89
|
-
|
|
90
|
-
It does not copy:
|
|
91
|
-
|
|
92
|
-
- unix socket forwards and ssh-agent forwarding, which it answers with `UNKNOWN_OP`
|
|
93
|
-
- the refusal of a port below 1024 to an image whose user is not root
|
|
94
|
-
- the limit of 16 clients waiting for impd, and the 10 s after which an unpaired client closes
|
|
82
|
+
The guest relays bytes and EOFs as the real guest agent's reverse forwards do, and drops its
|
|
83
|
+
connections when the imp sleeps.
|
|
84
|
+
[Testing against impd](https://github.com/zgeoff/impz/blob/main/docs/guides/testing-impd.md) lists
|
|
85
|
+
what it copies and what it does not.
|
|
95
86
|
|
|
96
87
|
## What this impd does not do
|
|
97
88
|
|