Skip to content

pryv/dev-validate-platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dev-validate-platform

External validation toolkit for a live Pryv.io platform. Run it against a freshly deployed platform (e.g. pryv.me or a single-instance) to validate it end-to-end from a real client, over the network.

It is intentionally a growing repository: each platform feature that needs live/external validation adds its own suite here.

Suites

Webhooks — scoped notifications (bin/validate-webhooks.js)

Validates the scoped-notification webhook surface against a running platform:

  • registers a scoped webhook (scopes: { onA: { kind: 'events', query: { streams: [A] } } }),
  • starts a local HTTP receiver,
  • writes an in-scope event (stream A) → expects a delivery carrying the matched scope key onA,
  • writes an out-of-scope event (stream B) → expects silence,
  • checks the create response echoes scopes without the internal prepared form.
npm install
node bin/validate-webhooks.js \
  --service https://reg.pryv.me/service/info \
  --username alice --password '******'

Options (or env SERVICE_INFO_URL / USERNAME / PASSWORD / RECEIVER_HOST / RECEIVER_PORT / RECEIVER_PUBLIC_URL):

flag default meaning
--service service-info URL of the platform
--username / --password a personal account on the platform
--receiver-host 127.0.0.1 host the platform uses to reach the receiver
--receiver-port 7654 local port the receiver binds
--receiver-public-url public base URL of the receiver (remote platform)

Reachability: the platform must be able to POST to the receiver. For a local platform both sides are on localhost. For a remote platform, expose the receiver (e.g. backloop.dev) and pass --receiver-public-url.

Exit code is 0 when all checks pass, non-zero otherwise — suitable for CI / post-deploy gating.

Run against a local open-pryv.io checkout

To validate a feature branch before it is deployed, scripts/run-local.js boots a throwaway single-instance from a local checkout (pinned to the same isolated PostgreSQL / rqlite / InfluxDB ports its config/test-config.yml uses — those DBs must be running), registers a user, runs the suite, and tears down:

node scripts/run-local.js --open-pryv /path/to/open-pryv.io

lib-js client suite

The canonical client-library validation (the pryv lib-js test suite) is run against a deployed platform as part of release validation. This repo depends on pryv and is the home for wiring that run alongside the webhook suite.

License

BSD-3-Clause

About

Live-platform external validation toolkit for Pryv.io (webhooks scoped-notifications + lib-js suite)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors