Files
p2ns/test-scripts
Raven Scott 84199270b3 BREAKING: Native p2ns.core RPC — invite.deliver, remove legacy invite channel
Replace RPC-to-string adapters and processCoreRequestMessage (~470 lines) with
typed handlers in core-swarm-handlers.js. Autopass invite wire now uses
invite.deliver RPC only; p2ns.core-invite protomux channel is removed.

- Add core-rpc-contract.js (METHODS, INVITE_STATUS) and core-swarm-handlers.js
  with shared processInviteWire for deliver, relay, and pairing
- core-rpc.js: deliverInviteWire via invite.deliver; invite.request returns
  { status, reason, inviteId }; invite.ack carries optional inviteId
- p2ns.js: register native handlers; slim p2ns.core-request (lifecycle only);
  proactive invite ack tracks inviteId; fix missing invite.queued handler
- proxy-server: channel-manager + shared handlers (no p2ns.core-invite strings)
- Tests: core-swarm-handlers.test.js, core-invite-rpc-integration.js; extend test:core-rpc
- Docs: PLUGIN_SDK RPC table; consensus.removeDomain in longform/RESTAPI/glossary
2026-05-28 11:09:05 -04:00
..

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.admin and https://peer.paste resolve.
  • Node.js 18+.

Scripts

  • npm run test:admin checks p2ns.admin health/status/stats endpoints.
  • npm run test:peer-paste checks peer.paste health/stats/OpenAPI endpoints.
  • npm run test:plugins checks peer.directory, global.profile, and file.drop API endpoints.
  • npm test runs all smoke scripts in sequence.

Custom target URL

You can pass a custom base URL:

  • node test-scripts/admin-smoke.js https://p2ns.admin
  • node test-scripts/peer-paste-smoke.js https://peer.paste

You can also override plugin targets with env vars:

  • PEER_DIRECTORY_URL
  • GLOBAL_PROFILE_URL
  • FILE_DROP_URL