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

Fetch and run protocol test vectors #125

Closed
wants to merge 9 commits into from
Closed

Fetch and run protocol test vectors #125

wants to merge 9 commits into from

Conversation

diehuxx
Copy link
Contributor

@diehuxx diehuxx commented Dec 21, 2023

Implements TBD54566975/tbdex#214. Currently using the test vectors in this branch of the spec TBD54566975/tbdex#215.

Dynamically fetch TBDex protocol test vectors from the spec repo. Cache the test vectors locally for later uses.

You can run a specific branch/commit of tbdex repo's test vectors by doing npm run test:node TEST_VECTOR_GIT_REF=<git-ref> where git ref is the desired branch, commit, or tag in the tbdex repo.

/*
 * Fetching and Caching of TBDex official test vectors, hosted at https://github.com/TBD54566975/tbdex/tree/main/hosted/test-vectors
 *
 * ENV Variables:
 * - TEST_VECTOR_GIT_REF: Specify the git-ref in the tbdex repo to pull test vectors from.
 *                        If the git ref is not a commit, we check the local cache to see if it was
 *                        associated with a commit in the past hour. If not, we fetch from Github.
 *                        The default git ref is DEFAULT_TBDEX_TEST_VECTOR_GIT_REF.
 *
 * - TEST_VECTOR_PATH: Specify a custom directory which contains test vectors. This is useful if you are editing
 *                     the tbdex repo locally and want to use the vectors in your local clone.
 *
 * - TEST_VECTOR_CACHE_DIRECTORY: Specify a custom directory where git refs and test vectors will be cached.
 *                                By default we use the <git-root>/.test-vectors-cache
 *
 */

Copy link

changeset-bot bot commented Dec 21, 2023

⚠️ No Changeset found

Latest commit: 173a6ef

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

* main:
  Remove HttpResponse and ErrorResponse from `http-client` types (#124)
  Refactor http client to introduce custom error types (#113)
  Finish validating rfq against provided offering (#120)
  Generates the HTML to publish to GH Pages (#116)
  http-server fixes + some tests (#83)
Copy link
Contributor

github-actions bot commented Jan 4, 2024

TBDocs Report

✅ No errors or warnings

@tbdex/protocol

  • Project entry file: packages/protocol/src/main.ts

@tbdex/http-client

  • Project entry file: packages/http-client/src/main.ts

@tbdex/http-server

  • Project entry file: packages/http-server/src/main.ts

TBDocs Report Updated at 2024-01-04T21:27:50Z 173a6ef

@diehuxx
Copy link
Contributor Author

diehuxx commented Jan 5, 2024

Closing in favor of #129

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

Successfully merging this pull request may close these issues.

1 participant