Skip to content

Commit

Permalink
feat(keychain-vault): add the missing endpoint classes hyperledger-ca…
Browse files Browse the repository at this point in the history
…cti#676

1. Adds the has/delete endpoints (which were missing completely)
2. Adds the get/set endpoints which were partially already implemented.
3. Moves the express dependency to be a dev dependency since we only
use the types (e.g. only needed at compile time, not at runtime)
4. Adds specific test cases to the API client verifying the
get/set/has/delete endpoints
5. Renames the getKeychainEntry and setKeychainEntry operationIDs
to have a V1 suffix.

Fixes hyperledger-cacti#676

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
  • Loading branch information
petermetz authored and RafaelAPB committed Nov 19, 2021
1 parent 83f0f72 commit e4f83c6
Show file tree
Hide file tree
Showing 16 changed files with 1,038 additions and 903 deletions.
170 changes: 163 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ test("NodeJS API server + Rust plugin work together", async (t: Test) => {
const key = uuidv4();
const expected = uuidv4();

await apiClient.setKeychainEntry({ key, value: expected });
await apiClient.setKeychainEntryV1({ key, value: expected });
const {
data: { value: actual },
} = await apiClient.getKeychainEntry({ key });
} = await apiClient.getKeychainEntryV1({ key });

t.equal(actual, expected, "Keychain stored value matches input OK");

Expand Down
Loading

0 comments on commit e4f83c6

Please sign in to comment.