From e021badf035d593d05298a6cb4d7ffdfd98bc7ab Mon Sep 17 00:00:00 2001 From: PatStLouis Date: Thu, 13 Feb 2025 22:23:22 +0000 Subject: [PATCH] update implementation file to json Signed-off-by: PatStLouis --- .gitignore | 2 +- docker/README.md | 4 ++-- docker/docker-compose.yml | 19 ++++++++++++++-- docker/implementation.example.yml | 38 +++++++++++++++++++++++++++++++ docker/localConfig.example.yml | 34 --------------------------- 5 files changed, 58 insertions(+), 39 deletions(-) create mode 100644 docker/implementation.example.yml delete mode 100644 docker/localConfig.example.yml diff --git a/.gitignore b/.gitignore index 0d258fa..0525c21 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ node_modules/ -localConfig.yml \ No newline at end of file +docker/implemenation.yml \ No newline at end of file diff --git a/docker/README.md b/docker/README.md index 1cba5c4..7ea63d1 100644 --- a/docker/README.md +++ b/docker/README.md @@ -13,10 +13,10 @@ To run your implementation against all test suites from one location, you can us ## Setup -Make sure you are in the `docker` directory, then copy the `localConfig` example file: +Make sure you are in the `docker` directory, then copy the `implementation` example file: ```bash cd ./docker -cp localConfig.example.yml localConfig.yml +cp implementation.example.yml implementation.yml ``` Edit the local config details to match your implementation. diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 2a49f01..453e972 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -1,6 +1,6 @@ --- include: - - localConfig.yml + - implementation.yml services: vc-data-model-v2: build: https://github.com/w3c/vc-data-model-2.0-test-suite.git#allure-in-docker @@ -13,6 +13,8 @@ services: configs: - source: localConfig.cjs target: /test-suite/localConfig.cjs + - source: implementation.json + target: /test-suite/implementation.json labels: - traefik.enable=true - traefik.http.routers.vc-data-model.rule=Host(`vc-data-model.docker.localhost`) @@ -29,4 +31,17 @@ services: ports: - 80:80 volumes: - - /var/run/docker.sock:/var/run/docker.sock:ro \ No newline at end of file + - /var/run/docker.sock:/var/run/docker.sock:ro + + +configs: + localConfig.cjs: + content: | + module.exports = { + settings: { + enableInteropTests: true + }, + implementations: [ + require('/test-suite/implementation.json') + ] + }; \ No newline at end of file diff --git a/docker/implementation.example.yml b/docker/implementation.example.yml new file mode 100644 index 0000000..fbbd100 --- /dev/null +++ b/docker/implementation.example.yml @@ -0,0 +1,38 @@ +--- +configs: + implementation.json: + content: | + { + "name": "My Company", + "implementation": "My Implementation Name", + "issuers": [ + { + "id": "", + "endpoint": "", + "options": {}, + "tags": [ + "vc2.0" + ] + } + ], + "verifiers": [ + { + "id": "", + "endpoint": "", + "options": {}, + "tags": [ + "vc2.0" + ] + } + ], + "vpVerifiers": [ + { + "id": "", + "endpoint": "", + "options": {}, + "tags": [ + "vc2.0" + ] + } + ] + } \ No newline at end of file diff --git a/docker/localConfig.example.yml b/docker/localConfig.example.yml deleted file mode 100644 index 8228829..0000000 --- a/docker/localConfig.example.yml +++ /dev/null @@ -1,34 +0,0 @@ - -configs: - localConfig.cjs: - content: | - const baseUrl = process.env.BASE_URL || 'http://implementation:8000'; - module.exports = { - settings: {}, - implementations: [ - { - name: 'My Company', - implementation: 'My Implementation Name', - issuers: [ - { - id: '', - endpoint: `${baseUrl}/credentials/issue`, - options: {}, - tags: ['vc2.0'] - } - ], - verifiers: [{ - id: '', - endpoint: `${baseUrl}/credentials/verify`, - options: {}, - tags: ['vc2.0'] - }], - vpVerifiers: [{ - id: '', - endpoint: `${baseUrl}/presentations/verify`, - options: {}, - tags: ['vc2.0'] - }] - } - ] - }; \ No newline at end of file