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 new method to test insertability of proposed entries into log #1410

Merged
merged 8 commits into from
May 14, 2023

Conversation

bobcallaway
Copy link
Member

@bobcallaway bobcallaway commented Mar 29, 2023

Summary

Given the schema definitions for entry types, there is a fair bit of embedded logic that ensures that entry proposals have the correct mix of properties and not others. For code readability, this PR proposes an intermediate step towards an updated API that is a start towards addressing #1305 by adding a new method to the EntryImpl interface called Insertable, which ensures that the unmarshalled entry has the appropriate fields specified.

  • add unit tests for each type

@codecov
Copy link

codecov bot commented Mar 29, 2023

Codecov Report

Merging #1410 (05a14a9) into main (d402c45) will increase coverage by 22.10%.
The diff coverage is 96.46%.

@@             Coverage Diff             @@
##             main    #1410       +/-   ##
===========================================
+ Coverage   43.37%   65.47%   +22.10%     
===========================================
  Files          74       80        +6     
  Lines        7436     7988      +552     
===========================================
+ Hits         3225     5230     +2005     
+ Misses       3873     2106     -1767     
- Partials      338      652      +314     
Flag Coverage Δ
e2etests 47.25% <8.58%> (?)
unittests 46.44% <96.46%> (+3.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/types/entries.go 47.69% <0.00%> (+42.60%) ⬆️
pkg/types/test_util.go 0.00% <0.00%> (ø)
pkg/types/alpine/v0.0.1/entry.go 74.33% <100.00%> (+18.56%) ⬆️
pkg/types/cose/v0.0.1/entry.go 69.72% <100.00%> (+14.74%) ⬆️
pkg/types/hashedrekord/v0.0.1/entry.go 76.31% <100.00%> (+22.04%) ⬆️
pkg/types/helm/v0.0.1/entry.go 52.47% <100.00%> (+3.28%) ⬆️
pkg/types/intoto/v0.0.1/entry.go 67.68% <100.00%> (+16.86%) ⬆️
pkg/types/intoto/v0.0.2/entry.go 68.93% <100.00%> (+19.09%) ⬆️
pkg/types/jar/v0.0.1/entry.go 60.86% <100.00%> (+18.97%) ⬆️
pkg/types/rekord/v0.0.1/entry.go 69.18% <100.00%> (+16.22%) ⬆️
... and 3 more

... and 51 files with indirect coverage changes

@bobcallaway bobcallaway marked this pull request as ready for review May 9, 2023 17:12
@bobcallaway bobcallaway requested review from asraa and a team as code owners May 9, 2023 17:12
@bobcallaway bobcallaway changed the title WIP: add new method to test insertability of proposed entries into log add new method to test insertability of proposed entries into log May 9, 2023
cpanato
cpanato previously approved these changes May 11, 2023
@bobcallaway bobcallaway dismissed stale reviews from cpanato and haydentherapper via 05a14a9 May 12, 2023 23:17
@bobcallaway bobcallaway merged commit e049df5 into sigstore:main May 14, 2023
@github-actions github-actions bot added this to the v1.1.0 milestone May 14, 2023
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.

3 participants