From 989f17865757f94d71b044f56b34b2005260aec1 Mon Sep 17 00:00:00 2001 From: Dmitri Zagidulin Date: Tue, 2 Jul 2019 09:44:31 -0400 Subject: [PATCH] Add example config file, troubleshooting section. --- README.md | 41 +++++++++++++++++++++++++++++++++++++++++ config.json.example | 5 +++++ 2 files changed, 46 insertions(+) diff --git a/README.md b/README.md index caf4381..4df5f5c 100644 --- a/README.md +++ b/README.md @@ -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): diff --git a/config.json.example b/config.json.example index e11c7c5..78a93f9 100644 --- a/config.json.example +++ b/config.json.example @@ -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 ... generators can choose between RS256 and ES256K private keys to generate JWS