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

Various test improvements #399

Merged
merged 5 commits into from
Jan 2, 2025
Merged

Conversation

niklasmohrin
Copy link
Collaborator

@niklasmohrin niklasmohrin commented Jan 1, 2025

See commit messages; see #390

Since these tests require internet access, they are undesirable in
reproducible builds [1] (and in general, I guess). The overall goal is
to shrink this list to a minimum. At some point we might remove the
feature again and ignore online tests by default. Before putting much
thought into refactoring the remaining tests, we should wait until we
have introduced the `updates.archive_url` option. Then, we could run a
local webserver that serves a known file. Until then, having the feature
already helps discourage using `--update` in tests that don't need it
and allows for quicker test execution locally if wanted.

- [1]: https://github.com/NixOS/nixpkgs/blob/edf04b75c13c2ac0e54df5ec5c543e300f76f1c9/pkgs/by-name/te/tealdeer/package.nix#L34-L44
Otherwise the builds made by `TestEnv::command` will conflict with each
other. This manifested itself on Windows with

> linking with `link.exe` failed: exit code: 1104
> LINK : fatal error LNK1104: cannot open file '...'
@niklasmohrin niklasmohrin merged commit 8266307 into tealdeer-rs:main Jan 2, 2025
9 checks passed
@niklasmohrin niklasmohrin deleted the tests branch January 2, 2025 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant