@celilo/e2e 0.7.12 → 0.7.13-alpha.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/.npm-registry-cache/celilo-e2e-0.7.13.tgz +0 -0
- package/netapps/authentik.netapp +0 -0
- package/netapps/caddy.netapp +0 -0
- package/netapps/celilo-website.netapp +0 -0
- package/netapps/greenwave.netapp +0 -0
- package/netapps/homebridge.netapp +0 -0
- package/netapps/iptables.netapp +0 -0
- package/netapps/knot-unbound-internal.netapp +0 -0
- package/netapps/namecheap.netapp +0 -0
- package/netapps/technitium.netapp +0 -0
- package/package.json +3 -2
- package/src/docker-compose-generator.ts +30 -2
- package/.npm-registry-cache/celilo-e2e-0.7.12.tgz +0 -0
|
Binary file
|
package/netapps/authentik.netapp
CHANGED
|
Binary file
|
package/netapps/caddy.netapp
CHANGED
|
Binary file
|
|
Binary file
|
package/netapps/greenwave.netapp
CHANGED
|
Binary file
|
|
Binary file
|
package/netapps/iptables.netapp
CHANGED
|
Binary file
|
|
Binary file
|
package/netapps/namecheap.netapp
CHANGED
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celilo/e2e",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.13-alpha.0",
|
|
4
4
|
"description": "E2E test infrastructure for Celilo-deployed applications. Provides a simulated internet with DNS hierarchy, ACME server, firewalls, and target machines in Docker.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
@@ -60,5 +60,6 @@
|
|
|
60
60
|
"type": "git",
|
|
61
61
|
"url": "https://github.com/psbanka/infra",
|
|
62
62
|
"directory": "packages/e2e"
|
|
63
|
-
}
|
|
63
|
+
},
|
|
64
|
+
"gitHead": "8e436b714b3a163fe62a84394732ce28f50e7452"
|
|
64
65
|
}
|
|
@@ -1,8 +1,36 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
1
3
|
import { stringify } from 'yaml';
|
|
2
4
|
import { SIMULATOR_IPS } from './simulator-ips';
|
|
3
5
|
import type { MachineSpec, NetworkConfig, TopologyPreset } from './types';
|
|
4
6
|
import { ZONE_GATEWAYS } from './types';
|
|
5
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Volumes for the registry container. Picks between source-bootstrap and
|
|
10
|
+
* uploads-bootstrap based on where the @celilo/e2e package lives:
|
|
11
|
+
*
|
|
12
|
+
* - **Monorepo dev** — `../../modules` from the compose file (which lives
|
|
13
|
+
* in `packages/e2e/`) resolves to `<repo>/modules`. The registry runs
|
|
14
|
+
* in BOOTSTRAP_MODULES_DIR mode and packs source modules on the fly,
|
|
15
|
+
* so edits to a module's source flow through without manual repack.
|
|
16
|
+
*
|
|
17
|
+
* - **npm-installed consumer** (lunacycle and friends) — `../../modules`
|
|
18
|
+
* would resolve to `<consumer>/node_modules/modules`, which doesn't
|
|
19
|
+
* exist. Docker fails the mount with "permission denied" trying to
|
|
20
|
+
* create that path. Instead we bind the pre-shipped `./netapps/` dir
|
|
21
|
+
* (always present in the npm tarball) to `/uploads`, and the registry's
|
|
22
|
+
* scanUploadsDir picks up the .netapp files.
|
|
23
|
+
*
|
|
24
|
+
* Detection: check whether the would-be monorepo modules dir is real.
|
|
25
|
+
* `import.meta.dir` is `<pkgDir>/src/`, so `../../../modules` from there
|
|
26
|
+
* is `<repo>/modules` in the monorepo and `<consumer>/node_modules/modules`
|
|
27
|
+
* (nonexistent) in a consumer install.
|
|
28
|
+
*/
|
|
29
|
+
function getRegistryVolumes(): string[] {
|
|
30
|
+
const monorepoModules = join(import.meta.dir, '..', '..', '..', 'modules');
|
|
31
|
+
return existsSync(monorepoModules) ? ['../../modules:/modules:ro'] : ['./netapps:/uploads:ro'];
|
|
32
|
+
}
|
|
33
|
+
|
|
6
34
|
const NETWORK_DRIVER_OPTS = {
|
|
7
35
|
'com.docker.network.bridge.enable_ip_masquerade': 'false',
|
|
8
36
|
'com.docker.network.endpoint.sysctls': 'net.ipv4.conf.IFNAME.rp_filter=0',
|
|
@@ -233,7 +261,7 @@ export function generateSharedInfraYaml(): string {
|
|
|
233
261
|
build: { context: '.', dockerfile: 'docker/Dockerfile.registry' },
|
|
234
262
|
networks: { 'internet-external': { ipv4_address: SIMULATOR_IPS.REGISTRY } },
|
|
235
263
|
cap_add: ['NET_ADMIN'],
|
|
236
|
-
volumes:
|
|
264
|
+
volumes: getRegistryVolumes(),
|
|
237
265
|
});
|
|
238
266
|
|
|
239
267
|
// External website prober simulator — mimics isitup.org's /api.json endpoint.
|
|
@@ -598,7 +626,7 @@ export function generateComposeYaml(config: NetworkConfig, celiloRoot = '..'): s
|
|
|
598
626
|
build: { context: '.', dockerfile: 'docker/Dockerfile.registry' },
|
|
599
627
|
networks: { 'internet-external': { ipv4_address: SIMULATOR_IPS.REGISTRY } },
|
|
600
628
|
cap_add: ['NET_ADMIN'],
|
|
601
|
-
volumes:
|
|
629
|
+
volumes: getRegistryVolumes(),
|
|
602
630
|
});
|
|
603
631
|
|
|
604
632
|
const allMachines = [
|
|
Binary file
|