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

Add rekor harness tests #945

Merged
merged 1 commit into from
Aug 3, 2022
Merged

Add rekor harness tests #945

merged 1 commit into from
Aug 3, 2022

Conversation

priyawadhwa
Copy link
Contributor

@priyawadhwa priyawadhwa commented Jul 28, 2022

This PR adds in tests specifically for the test harness. Instead of running tests we already have, the harness will run specific tests:

  1. TestHarnessAddEntry -- adds in the standard HashedRekord type
  2. TestHarnessAddIntoto -- adds in an intoto attestation
  3. TestHarnessGetAllEntriesLogIndex -- makes sure the current combo of rekor-server/rekor-cli can get every entry in the log by log index. If the entry is an attestation, confirms that the "Attestation" field is not empty.

We still test against the 3 most recent versions of the server, against the 3 most recent versions of the CLI. We start the server, run the tests, and then upgrade. At the end, we make sure there are 18 entries in the log as expected.

TODO: We want to make sure that getting entries by UUID/EntryID will also work. Will add that in an upcoming PR.

cc @bobcallaway

@priyawadhwa priyawadhwa requested review from cpanato and a team as code owners July 28, 2022 23:06
…versions

Signed-off-by: Priya Wadhwa <priya@chainguard.dev>
@cpanato cpanato requested a review from bobcallaway July 29, 2022 08:07
Copy link
Member

@bobcallaway bobcallaway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, one question regarding the logic

tests/harness_test.go Show resolved Hide resolved
@priyawadhwa
Copy link
Contributor Author

thanks for the reviews! i don't think i have write access, could someone merge this for me? 😄

@cpanato cpanato merged commit 102dc64 into sigstore:main Aug 3, 2022
@github-actions github-actions bot added this to the v1.0.0 milestone Aug 3, 2022
@priyawadhwa priyawadhwa deleted the harness-rb branch August 3, 2022 16:26
bobcallaway pushed a commit to bobcallaway/rekor that referenced this pull request Aug 3, 2022
…versions (sigstore#945)

Signed-off-by: Priya Wadhwa <priya@chainguard.dev>
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.

4 participants