Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions app/tests/bundle_uploads.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,11 @@ async fn more_entries_than_declared_fail_the_build(app: Application) -> laravel:
let files = fresh_pngs(2);
let id = create(&app, &token).await;
register(&app, &token, &id, &files).await;
// The first file twice, then the second: three entries for two declared.
// The smaller file twice, then the other: three entries for two declared. The bundle may unpack to no more than
// the declared total, checked before each entry, so duplicating the larger file would trip that limit first.
let (small, large) = if files[0].len() <= files[1].len() { (&files[0], &files[1]) } else { (&files[1], &files[0]) };
let mut w = bundle::Writer::new(Vec::new()).unwrap();
for f in [&files[0], &files[0], &files[1]] {
for f in [small, small, large] {
w.add(&sha(f), f).unwrap();
}
let bundle = send(&app, &token, &id, &declared(&files), w.finish().unwrap()).await;
Expand Down
Loading