diff options
Diffstat (limited to 'tests/invariants.rs')
| -rw-r--r-- | tests/invariants.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/invariants.rs b/tests/invariants.rs index 2bdbc8b..8234817 100644 --- a/tests/invariants.rs +++ b/tests/invariants.rs @@ -426,12 +426,13 @@ fn i9_a_build_cannot_smuggle_bytes_in_from_outside_its_own_staging_dir() { let out = pipeline::run(&env.cfg, &env.db, &id); env.cfg.shim_plant_link = None; - let err = match out { - Err(e) => e.to_string(), + let (step, err) = match out { + Ok(pipeline::Outcome::Failed { step, error, .. }) => (step, error), other => panic!("a build that smuggled in a symlink must fail closed, got {other:?}"), }; + assert_eq!(step, "collect", "it should be refused at collect, before anything is copied"); assert!( - err.contains("staging") || err.contains("symlink"), + err.contains("symlink") && err.contains("staging"), "the failure should say why it refused: {err}" ); |
