-
Notifications
You must be signed in to change notification settings - Fork 528
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 static.NewLayer #1093
Add static.NewLayer #1093
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1093 +/- ##
==========================================
+ Coverage 75.44% 75.49% +0.05%
==========================================
Files 107 108 +1
Lines 5159 5170 +11
==========================================
+ Hits 3892 3903 +11
Misses 714 714
Partials 553 553
Continue to review full report at Codecov.
|
l := NewLayer(b, types.OCILayer) | ||
|
||
// This does basically nothing. | ||
if err := validate.Layer(l, validate.Fast); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why fast? You can drop half this test if you do standard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static_test.go:33: gzip: invalid header
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should maybe fix that to actually look at media types (for +gzip)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to do that? I'm fine just manually validating in this test for now.
Mainly copied from cosign, with basic tests, and a
sync.Once
aroundDigest()
.