remoteStorage REST API validator.
The spec version to test comes from the webfinger response by default, but you can also use the browser version to say "test that this server conforms to version X".
Mocha has a grep option to filter tests in the browser, for example public folder with no token.
Install Node.js and npm, then install the dependencies:
npm i| name | description |
|---|---|
SERVER_URL |
server root URL (like https://kosmos.org) |
ACCOUNT_HANDLE |
username of test account (like tony) |
TOKEN_SCOPE (optional) |
scope/category to test (defaults to api-test-suite) |
SPEC_VERSION (optional) |
draft version number (like 22) |
TOKEN_READ_WRITE |
OAuth token with read/write access to the specified TOKEN_SCOPE |
TOKEN_READ_ONLY |
OAuth token with read-only access to the specified TOKEN_SCOPE |
TOKEN_GLOBAL |
OAuth token with read/write access to the root folder |
- Create a remoteStorage test account on the server you'd like to verify.
- Copy
.env.exampleto.envto setSERVER_URLandACCOUNT_HANDLEfrom the previous step - Visit the browser version above or run the local command below to generate the corresponding OAuth tokens.
npm testCreate an alternative environments (like .env.kosmos) and run them with
ENV=kosmos npm testStart the static server:
npm startthen visit http://localhost:8080.