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

Refactor tests to support StatusList2021 type #13

Merged
merged 39 commits into from
Jul 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
1a637ce
Refactor tests for issue and add helper function to assert SlCredential.
JSAssassin May 12, 2022
07e8907
Move code to create validVc into a helper function.
JSAssassin May 12, 2022
b0851f5
Update `vc-generator` and move `documentLoader.js`.
JSAssassin May 13, 2022
65f4ed7
Move `contexts.js` to tests.
JSAssassin May 13, 2022
d6f2a0e
Update `README.md`.
JSAssassin May 13, 2022
5af4d19
Add a `getSlc` helper function.
JSAssassin May 13, 2022
7b3809e
Add `createRequestBody` helper function.
JSAssassin May 13, 2022
4831532
Move assertion for credentialSubject.
JSAssassin May 13, 2022
7c590cb
Fix typo.
JSAssassin May 13, 2022
ee1826e
Refactor `_validVc()`.
JSAssassin May 13, 2022
1bfdade
Move assertions for verification into separate helper functions.
JSAssassin May 13, 2022
d10ac89
Remove unused dependencies.
JSAssassin May 13, 2022
02b746d
Update to use `vc-api-test-suite-implementations#update-db-zcaps`.
JSAssassin May 19, 2022
89063b3
Add assertion for `credentialStatus.statusPurpose`.
JSAssassin May 24, 2022
01ab891
Add issuer tests for credential with suspension type statusPurpose.
JSAssassin May 24, 2022
f7d0cc2
Refactor `createValidVc()`.
JSAssassin May 24, 2022
1c27f49
Update vc-generator.
JSAssassin May 25, 2022
e0efe48
Pass issuer instead of issuer id.
JSAssassin May 25, 2022
41be419
Remove `.only`.
JSAssassin May 25, 2022
714d372
Use main branch for `vc-api-test-suite-implementations`.
JSAssassin May 25, 2022
504410c
Update test titles.
JSAssassin May 25, 2022
c8c65ca
Add tests for StatusList2021 with suspension credential status.
JSAssassin May 25, 2022
b8500d0
Update `vc-api-test-suite-implementations`.
JSAssassin Jun 7, 2022
33e52b2
Change back tag to `Revocation`.
JSAssassin Jun 7, 2022
6a6d150
Update static VCs.
JSAssassin Jun 8, 2022
48d8ecb
Convert to module.
JSAssassin Jun 8, 2022
d839427
Fix test script.
JSAssassin Jun 8, 2022
974374d
Fix quotes.
JSAssassin Jun 8, 2022
e755451
Use `@digitalbazaar/vc-status-list-context` v3.0.1.
JSAssassin Jun 15, 2022
ffb2e61
Fix status list context url.
JSAssassin Jun 16, 2022
7adbbba
Update static credentials.
JSAssassin Jun 16, 2022
f8d20b9
Use latest `[email protected]`.
JSAssassin Jun 24, 2022
6179692
Remove `expirationDate` from `createValidVc()`.
JSAssassin Jun 29, 2022
ad9334d
Update to use latest `vc-api-test-suite-implementations` changes.
JSAssassin Jul 5, 2022
09b6fda
Rebase on main and remove `.only`.
JSAssassin Jul 5, 2022
5936da5
Change `issuer.issue` to `issuer.post`.
JSAssassin Jul 5, 2022
581acfc
Remove code for generating static vcs.
JSAssassin Jul 5, 2022
ede0489
Use `main` branch for `vc-api-test-suite-implementations`.
JSAssassin Jul 11, 2022
849086b
Update comment.
JSAssassin Jul 11, 2022
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
13 changes: 10 additions & 3 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ module.exports = {
node: true
},
extends: [
'eslint-config-digitalbazaar',
'eslint-config-digitalbazaar/jsdoc'
]
'eslint-config-digitalbazaar/jsdoc',
'digitalbazaar/module',
],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module'
},
rules: {
'jsdoc/check-examples': 0
}
};
4 changes: 0 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: Install npm dependencies
run: npm install --legacy-peer-deps
- name: Clean VCs
run: rm -f ./static-vcs/*.json
- name: Generate VCs
run: npm run generate-vcs
- name: Run test with Node.js ${{ matrix.node-version }}
env:
CLIENT_SECRET_DB: ${{ secrets.CLIENT_SECRET_DB }}
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ npm run generate-vcs
## Implementation
To add your implementation to this test suite see the [README here.](https://github.com/w3c-ccg/vc-api-test-suite-implementations)
Add the tag `StatusList2021` to the issuers and verifiers you want tested.
To run the tests, some implementations require client secrets
that can be passed as env variables to the test script. To see which ones
require client secrets, you can check the [vc-api-test-suite-implementations](https://github.com/w3c-ccg/vc-api-test-suite-implementations) library.
To run the tests and to generate VCs, some implementations require client
secrets that can be passed as env variables to the test script. To see which
ones require client secrets, you can check the [vc-api-test-suite-implementations](https://github.com/w3c-ccg/vc-api-test-suite-implementations)
library.
10 changes: 0 additions & 10 deletions credentials/index.js

This file was deleted.

34 changes: 15 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"name": "status-list-2021-test-suite",
"version": "0.1.0",
"description": "Interoperability Tests for StatusList2021",
"main": "index.js",
"main": "/tests",
"type": "module",
"scripts": {
"test": "mocha tests --require esm --reporter @digitalbazaar/mocha-w3c-interop-reporter --reporter-options abstract=\"$PWD/abstract.hbs\",reportDir=\"$PWD/reports\",respec=\"$PWD/respecConfig.json\",title=\"Status List 2021 Interoperability Report 1.0\",suiteLog='./suite.log' --timeout 15000 --preserve-symlinks",
"lint": "eslint .",
"generate-vcs": "node vc-generator"
"test": "mocha tests --reporter @digitalbazaar/mocha-w3c-interop-reporter --reporter-options abstract=\"$PWD/abstract.hbs\",reportDir=\"$PWD/reports\",respec=\"$PWD/respecConfig.json\",title=\"Status List 2021 Interoperability Report 1.0\",suiteLog='./suite.log' --timeout 15000 --preserve-symlinks",
"lint": "eslint ."
},
"repository": {
"type": "git",
Expand All @@ -25,32 +25,28 @@
"url": "https://digitalbazaar.com/"
},
"engines": {
"node": "14.0.0"
"node": ">=16.0.0"
},
"dependencies": {
"@digitalbazaar/did-method-key": "^2.0.0",
"@digitalbazaar/ed25519-signature-2020": "^3.0.0",
"@digitalbazaar/http-client": "^2.0.1",
"@digitalbazaar/mocha-w3c-interop-reporter": "^1.2.0",
"@digitalbazaar/vc": "^2.1.0",
"@digitalbazaar/vc-status-list": "^2.1.0",
"@digitalbazaar/vc-status-list-context": "^2.0.0",
"@digitalbazaar/http-client": "^3.2.0",
"@digitalbazaar/mocha-w3c-interop-reporter": "^1.2.1",
"@digitalbazaar/vc-status-list": "^5.0.0",
"@digitalbazaar/vc-status-list-context": "^3.0.1",
"@digitalcredentials/did-context": "^1.0.0",
"bnid": "^2.1.0",
"chai": "^4.3.4",
"credentials-context": "^2.0.0",
"ed25519-signature-2020-context": "^1.1.0",
"jsonld-document-loader": "^1.2.0",
"jsonld-document-loader": "^1.2.1",
"klona": "^2.0.5",
"mocha": "^9.1.3",
"require-dir": "^1.2.0",
"mocha": "^10.0.0",
"uuid": "^8.3.2",
"vc-api-test-suite-implementations": "github:w3c-ccg/vc-api-test-suite-implementations"
},
"devDependencies": {
"eslint": "^7.23.0",
"eslint-config-digitalbazaar": "^2.6.1",
"eslint-plugin-jsdoc": "^32.3.0"
"eslint": "^8.19.0",
"eslint-config-digitalbazaar": "^4.0.1",
"eslint-plugin-jsdoc": "^39.3.3",
"eslint-plugin-unicorn": "^43.0.0"
},
"bugs": {
"url": "https://github.com/w3c-ccg/status-list-2021-test-suite/issues"
Expand Down
31 changes: 0 additions & 31 deletions static-vcs/invalidCredentialStatusType.json

This file was deleted.

31 changes: 0 additions & 31 deletions static-vcs/invalidStatusListCredentialId.json

This file was deleted.

31 changes: 0 additions & 31 deletions static-vcs/validVc.json

This file was deleted.

Loading