Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example config file, troubleshooting section. #68

Merged
merged 1 commit into from
Jul 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,47 @@ or when generating the report:
mocha --recursive --timeout 10000 test/vc-data-model-1.0/ -R json > implementations/report.json
```

#### JWT Key Error

If your tests fail with the following error:

```
TypeError: Cannot read property 'es256kPrivateKeyJwk' of undefined
```

This means that you need to do one of:

a. Configure the JWT keys (see the [JWT Test Configuration](#jwt-test-configuration)
section below)
b. Mark the JWT section as not supported, by adding
`"sectionsNotSupported": ["jwt"]` to `your config.json`.

### Configuring the Test Suite

#### Basic Configuration

For example, the config for the [`vc-js`](https://github.com/digitalbazaar/vc-js)
implementation is below:

```json
{
"generator": "../vc-js/bin/vc-js test-issue < ",
"presentationGenerator": "../vc-js/bin/vc-js test-presentation <",
"generatorOptions": "",
"sectionsNotSupported": ["jwt", "zkp"]
}
```

This tells the test harness several things:

* Use the `../vc-js/` implementation directory (you should substitute the path
to your own)
* Exclude the JWT and ZKP sections (since this particular implementation does
not yet have support for those)

For a more in-depth discussion of how the test suite works, see
this [comment on issue #14](https://github.com/w3c/vc-test-suite/issues/14#issuecomment-487795533).

#### JWT Test Configuration

The following are the command line parameters that JWT generators have to expect (in addition to the filename/path):
Expand Down
5 changes: 5 additions & 0 deletions config.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
// The arguments that should be passed to the VC generator.
"generatorOptions":"",

// Add section features you are explicitly not supporting
// For example, to exclude all features, you would:
// "sectionsNotSupported": ["basic", ""schema", "refresh", "evidence", "status", "tou", "ldp", "jwt", "zkp"]
"sectionsNotSupported": [],

// The following JSON object is used to configure JWT test cases. The test cases will derive the following
// parameters from the JSON object:
// --jwt <base64-encoded-keys> ... generators can choose between RS256 and ES256K private keys to generate JWS
Expand Down