make it easier to update image_test hashes#2148
Conversation
e07807d to
725e45a
Compare
|
Ok, this is ready for reviewer now. |
We had to do this recently with bazelbuild#2098. This is also useful for organisations that link against different zlib implementations (namely zlib-ng). This change makes it possible to easily swap out the hashes without modifying the test code.
| visibility = ["//visibility:private"], | ||
| ) | ||
|
|
||
| filegroup( |
There was a problem hiding this comment.
Would it be possible to create an image hash json file? This way we could have testdata/image-hash.json which could have:
{
"test_base_with_entrypoint": "..."
}
This might be a little easier to use outside of google3 but I'm not sure. WDYT?
There was a problem hiding this comment.
Can you explain how that would make it easier? These files are only meant to be used in tests, and the test-helper I added in this CL is designed to be generic. It's essentially just a simple python port of a generic test helper like this. I don't see how making it less generic makes it better.
|
This Pull Request has been automatically marked as stale because it has not had any activity for 180 days. It will be closed if no further activity occurs in 30 days. |
|
This PR was automatically closed because it went 30 days without a reply since it was labeled "Can Close?" |
We had to do this recently with #2098. This is also useful for organisations that link against different zlib implementations (namely zlib-ng). This change makes it possible to easily swap out the hashes without modifying the test code.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
test hashes are hardcoded into test, and must be updated manually
Issue Number: N/A
What is the new behavior?
test hashes are now encoded in testdata/goldens and can be regenerated by the test when needed.
Does this PR introduce a breaking change?
Other information