-
Notifications
You must be signed in to change notification settings - Fork 11
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
Use crypto.sha1()
instead of sha1sum command
#55
Conversation
mist714
commented
Oct 11, 2022
•
edited
Loading
edited
- Delete sha1sum command
- Add Compatibility tests for old version of hash
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.
@mist714 LGTM overall. One thing, could we add a compatibility test for this change?
nits: please update the PR title and description.
crypto.sha1()
instead of sha1sum command
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.
Thank you for adding the compatibility test🚀 LGTM overall! Please check my comments.
pkg/util/hash/hash_test.go
Outdated
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func CalculateHashWithCommand(filepath string) (string, error) { |
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.
nits: no need to export this function. could we make it private?
return hash, nil | ||
} | ||
|
||
func TestHashCompatibility(t *testing.T) { |
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.
Could you add a comment here on why we have this test here??
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.
LGTM👍