Skip to content

Commit

Permalink
Constantify serve_{dir,file} test file paths and content
Browse files Browse the repository at this point in the history
Mainly a QoL change for downstream packagers, but might also prove
useful for e.g. future refactors.

Currently we have to patch all those file paths to something exsistent,
due to test-files/ not being included in crates.io releases, while the
Debian Rust Team pulls Rust crate source from there:

https://salsa.debian.org/rust-team/debcargo-conf/-/blob/ee75c0c18a/src/tower-http/debian/patches/missing-testdata

With these constants we could change only them.

Test files are also changed to the same content, so one constant fits
all.
  • Loading branch information
nc7s committed Jan 20, 2025
1 parent d0c522b commit 6aa0bef
Show file tree
Hide file tree
Showing 9 changed files with 184 additions and 159 deletions.
2 changes: 1 addition & 1 deletion test-files/missing_precompressed.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Test file!
Test file
Binary file modified test-files/only_gzipped.txt.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion test-files/precompressed.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"This is a test file!"
Test file
Binary file modified test-files/precompressed.txt.br
Binary file not shown.
Binary file modified test-files/precompressed.txt.gz
Binary file not shown.
Binary file modified test-files/precompressed.txt.zst
Binary file not shown.
Binary file modified test-files/precompressed.txt.zz
Binary file not shown.
Loading

0 comments on commit 6aa0bef

Please sign in to comment.