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

Difficulty getting local implementation setup #14

Open
brianorwhatever opened this issue Jan 11, 2024 · 4 comments
Open

Difficulty getting local implementation setup #14

brianorwhatever opened this issue Jan 11, 2024 · 4 comments

Comments

@brianorwhatever
Copy link
Contributor

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

@JSAssassin
Copy link
Contributor

JSAssassin commented Jan 12, 2024

@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.

@brianorwhatever
Copy link
Contributor Author

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

@JSAssassin
Copy link
Contributor

@brianorwhatever yep, I think I just copy pasta'd your spelling :P. Glad you got it working though!

@aljones15
Copy link
Collaborator

@brianorwhatever not a lot of people have used the local option so any feedback or fixes on it are more than welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants