Open acheng-01 opened 3 months ago
I've confirmed that source files have their metadata published to /source/by-hash. In my testing I have also confirmed that the by-hash file is used upon downloading the package with apt-get.
Yea, I thought we had tests for apt-by-hash but it looks like we just added one for caching content to be served for apt-by-hash.
I think adding a test for apt-by-hash makes sense. I don't have a preference if we add it in this PR or a followup PR. Also, I might suggest we add a general apt-by-hash test and not one for the source files since source files are a pain to test with.
Also, how do we enable APT_BY_HASH in the test environment. Just set it here?
Also, how do we enable APT_BY_HASH in the test environment. Just set it here?
@daviddavis Yea I think that should do it.
It might be sufficient to add a test here and see if we can just download the correct files from the by-hash
folders? That way it should be pretty simple to test both standard and source packages. The default repository in the test fixtures provides both types of packages.
Thanks for chiming in everyone. I'll look into adding tests in within the next week or so as part of this PR!
Refactored the previous AptByHash code to extend publishing at by-hash paths for source files.
Closes #1059