Currently there are some unit tests related to fetching but no integration test coverage for package fetching. This leads to regressions and makes it harder to accept contributions.
Some things that should be covered:
- fetching from git
- fetching from each kind of compressed tarball
- fetching from http and https
- ensuring the content hash does or does not match across various conditions
- ensuring the packages cannot mutate file system outside of package directory
- ensuring that "recompression" and fetching from that cached data yields correct content hash
These tests should be based on driving zig build --fetch, zig fetch, and direct interactions with the file system.
However, test coverage within this source tree should not depend on external networking being online; tests should be self-contained. Therefore, this test coverage might need to be at least partially in a separate repository, and we need a plan for how to integrate (or not) with CI.
Labeling as bug because this will probably find bugs.
Currently there are some unit tests related to fetching but no integration test coverage for package fetching. This leads to regressions and makes it harder to accept contributions.
Some things that should be covered:
* fetching from git
* fetching from each kind of compressed tarball
* fetching from http and https
* ensuring the content hash does or does not match across various conditions
* ensuring the packages cannot mutate file system outside of package directory
* ensuring that "recompression" and fetching from that cached data yields correct content hash
These tests should be based on driving `zig build --fetch`, `zig fetch`, and direct interactions with the file system.
However, test coverage within this source tree should not depend on external networking being online; tests should be self-contained. Therefore, this test coverage might need to be at least partially in a separate repository, and we need a plan for how to integrate (or not) with CI.
Labeling as bug because this will probably find bugs.