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

chore(tests): unit tests for Claim Cache #92

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

fforbeck
Copy link
Member

@fforbeck fforbeck commented Jan 17, 2025

Test Cases

  • should cache assert/location claims
  • should return an error indicating missing capabilities
  • should return an error indicating a failure in reading caveats
  • should return an error when invalid data causes ContextID.ToEncoded() to fail
  • should handle the expiration correctly and cache the claim
  • should handle the absence of expiration correctly and cache the claim
  • should handle a delegation with a range in the caveats and cache appropriately
  • should handle a delegation without a range in the caveats and cache appropriately
  • should propagate the error from the claims.Cache function
  • should propagate the error from the provIndex.Cache function

@fforbeck fforbeck self-assigned this Jan 17, 2025
Copy link

codecov bot commented Jan 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
pkg/service/service.go 39.03% <100.00%> (+6.63%) ⬆️

... and 2 files with indirect coverage changes

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