Skip to content

Commit 05352ef

Browse files
committed
revise documentation
1 parent 5b730db commit 05352ef

1 file changed

Lines changed: 29 additions & 17 deletions

File tree

README.md

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
# API test suite for remoteStorage servers
1+
# spec-check
22

3-
Verify the compatibility of any web server with the [remoteStorage
4-
spec](http://tools.ietf.org/html/draft-dejong-remotestorage-11)'s REST API, versions 03–05; also valid for later versions but missing specs for some newer features.
3+
[remoteStorage REST API](http://tools.ietf.org/html/draft-dejong-remotestorage-22) validator.
4+
5+
https://spec-check.0data.app
6+
7+
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".
8+
9+
Mocha has a `grep` option to filter tests in the browser, for example [public folder with no token](https://spec-check.0data.app/?grep=%5Epublic%20folder%20with%20no%20token%20).
510

611
## Development
712

@@ -13,23 +18,19 @@ npm i
1318

1419
### Configure environment
1520

16-
| name | description |
17-
| - | - |
18-
| `SERVER_URL` | defaults to `api-test-suite` |
19-
| `TOKEN_SCOPE` (optional) | defaults to `api-test-suite` |
20-
| `ACCOUNT_HANDLE` | username of test account |
21-
| `TOKEN_READ_WRITE` | OAuth token with read/write access to the specified `CATEGORY` |
22-
| `TOKEN_READ_ONLY` | OAuth token with read-only access to the specified `CATEGORY` |
23-
| `TOKEN_GLOBAL` | OAuth token with read/write access to the root folder |
24-
21+
| name | description | example/default |
22+
| - | - | - |
23+
| `SERVER_URL` | server root url | `https://kosmos.org` |
24+
| `ACCOUNT_HANDLE` | username of test account | `tony` |
25+
| `TOKEN_SCOPE` (optional) | scope/category to test | `api-test-suite` |
26+
| `SPEC_VERSION` (optional) | draft version number | `22` |
27+
| `TOKEN_READ_WRITE` | OAuth token with read/write access to the specified `TOKEN_SCOPE` | |
28+
| `TOKEN_READ_ONLY` | OAuth token with read-only access to the specified `TOKEN_SCOPE` | |
29+
| `TOKEN_GLOBAL` | OAuth token with read/write access to the root folder ||
2530

2631
1. Create a remoteStorage test account on the server you'd like to verify.
2732
2. Copy `.env.example` to `.env` to set `SERVER_URL` and `ACCOUNT_HANDLE` from the previous step
28-
3. Run the tokens app using the command below and visit https://localhost:5000 to generate the corresponding OAuth tokens:
29-
30-
```sh
31-
npm run tokens
32-
```
33+
3. Visit the browser version above or run the local command below to generate the corresponding OAuth tokens.
3334

3435
### Testing
3536

@@ -42,3 +43,14 @@ Create an alternative environments (like `.env.kosmos`) and run them with
4243
```sh
4344
ENV=kosmos npm test
4445
```
46+
47+
### Local
48+
49+
Start the static server:
50+
51+
```sh
52+
npm test
53+
```
54+
55+
then visit http://localhost:8080.
56+

0 commit comments

Comments
 (0)