Open brianorwhatever opened 5 months ago
@brianorwhatever Sorry the documentation isn't very clear. That file is being used here https://github.com/w3c/vc-test-suite-implementations/blob/main/implementations/index.js#L17. Once you've added the file .localImplementationConfig.cjs
in the test suite and added your config within the file like in the example below, you should be able run the npm test
script in the test suite. This will include both the localhost and the other non-localhost implementations in the test run. You can check the test run results in reports/index.html
.
module.exports = [{
"name": "My Localhost",
"implementation": "Localhost",
"issuers": [{
"id": "urn:uuid:my:implementation:issuer:id",
"endpoint": "https://localhost:40443/issuers/foo/credentials/issue",
"tags": ["localhost", "Ed25519Signature2020"]
}],
"verifiers": [{
"id": "https://localhost:40443/verifiers/z19uokPn3b1Z4XDbQSHo7VhFR",
"endpoint": "https://localhost:40443/verifiers/z19uokPn3b1Z4XDbQSHo7VhFR/credentials/verify",
"tags": ["localhost", "Ed25519Signature2020"]
}]
}];
To only run the localhost implementations, you'll have to modify the test suite to filter implementations based on a specific tag that is used in your localhost configuration file. For instance, if you localhost config looks like above, you can update the tags used in the test in the following places to "locallhost" and then run the test - https://github.com/w3c/vc-di-ed25519signature2020-test-suite/blob/main/tests/10-create.js#L14, https://github.com/w3c/vc-di-ed25519signature2020-test-suite/blob/main/tests/10-create.js#L46, https://github.com/w3c/vc-di-ed25519signature2020-test-suite/blob/main/tests/20-verify.js#L15, https://github.com/w3c/vc-di-ed25519signature2020-test-suite/blob/main/tests/20-verify.js#L46, https://github.com/w3c/vc-di-ed25519signature2020-test-suite/blob/main/tests/30-interop.js#L11.
Ah yeah thank you @JSAssassin! I managed to get it to work it looks like I (and you in your example above) made a mistake in the file name. I had been using .localImplementationConfig.cjs
but the real file name should be .localImplementationsConfig.cjs
with an s
in there
@brianorwhatever yep, I think I just copy pasta'd your spelling :P. Glad you got it working though!
@brianorwhatever not a lot of people have used the local option so any feedback or fixes on it are more than welcome.
I am trying to run tests in the Ed25519Signature2020 test suite and am having troubles getting the local implementation config working. The instructions say to create a .localImplementationConfig.cjs however it doesn't look like that is imported anywhere and it's unclear how to