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

Provide a full integration test for pkg_zip #498

Open
aiuto opened this issue Dec 26, 2021 · 1 comment
Open

Provide a full integration test for pkg_zip #498

aiuto opened this issue Dec 26, 2021 · 1 comment
Labels
p4 An idea that we are not considering working on at this time.
Milestone

Comments

@aiuto
Copy link
Collaborator

aiuto commented Dec 26, 2021

pkg_zip should have an intergration test that

  • builts a zip file using an instance of every supported feature
  • unzips that file and inspects the file system for the expected results

Doing this with maximum fidelity requires, at a minimum, using the unzip tool which would be the logical default on any given OS. If there are multiple competitors, we would need to test against several versions. So, a robust integration test would require an "unzip" toolchain that finds the right unzip tool for each OS.

OTOH, doing this completely is a lot of work for little payoff. We currently have tests that use python zipfile to inspect .zip files to see if their content is as expected. The python code base has more testing resources thrown at it than we ever will. I expect it has closer fidelity to the expected behavior on any OS than we could ever achieve. I'm happy to go with the presumption that if the python zipfile module tells us we will get a file with specific attributes, so will the OS local 'unzip'.

@aiuto aiuto added the p4 An idea that we are not considering working on at this time. label Dec 26, 2021
@aiuto aiuto added this to the 1.1 milestone Dec 26, 2021
@nacl
Copy link
Collaborator

nacl commented Jan 10, 2022

Another thing to note here is that what python supports in its zipfile framework is not necessarily what is supported by local unzip binaries. In particular, there are alternate compression modes that may not be supported by the standard unzip tool and file format.

See also https://en.wikipedia.org/wiki/ZIP_(file_format)#Standardization for differences on what's standardized and not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p4 An idea that we are not considering working on at this time.
Projects
None yet
Development

No branches or pull requests

2 participants