Remove the last layer of soft centralization: a lone `--master` on empty storage could still implicitly genesis a separate Autopass and split the network on the same TOPIC_SEED. Genesis is now explicit (`--master --genesis`); secondary masters pair via invite into the same dnsPass as joiners, with a shared network manifest, split-brain diagnostics, and writer-aware quorum. - Genesis vs secondary master boot paths; auto-adopt manifest on upgrade - Masters without dnsPass accept invites; masters with pass ignore them - NETWORK_MANIFEST_FILE, P2NS_GENESIS, MASTER_LOAD_DOMAINS, MASTER_INVITE_ONLY - core.status networkId; admin diagnostics; docs and multi-master tests BREAKING: operators must run one genesis per network; additional masters use `node p2ns.js --master` (not `--genesis`) on empty storage.
1.4 KiB
1.4 KiB
Smoke tests
These scripts validate core HTTP surfaces on a running P2NS instance.
Prerequisites
- P2NS is running locally and serving internal domains.
- Root certificate is trusted so
https://p2ns.adminandhttps://peer.pasteresolve. - Node.js 18+.
Scripts
npm run test:adminchecksp2ns.adminhealth/status/stats endpoints.npm run test:peer-pastecheckspeer.pastehealth/stats/OpenAPI endpoints.npm run test:pluginscheckspeer.directory,global.profile, andfile.dropAPI endpoints.npm run test:plugin-rpcrunsplugin-channel-rpc.test.js(offline contract tests for protomux-rpc plugin channels; no running node required).npm run test:core-rpcruns core RPC smoke,network-manifest.test.js,core-swarm-handlers.test.js,multi-master.test.js(simulated genesis + N masters, default 4), and invite integration static checks.npm run test:multi-masterruns only the multi-master simulation (MULTI_MASTER_COUNT=6 node test-scripts/multi-master.test.jsto scale).npm testruns admin, peer-paste, and plugins smoke scripts in sequence (does not includetest:plugin-rpcortest:core-rpc).
Custom target URL
You can pass a custom base URL:
node test-scripts/admin-smoke.js https://p2ns.adminnode test-scripts/peer-paste-smoke.js https://peer.paste
You can also override plugin targets with env vars:
PEER_DIRECTORY_URLGLOBAL_PROFILE_URLFILE_DROP_URL