max / alloy
- Co-Authored-By
- Claude Opus 5 (1M context) <noreply@anthropic.com>
1 file changed,
+21 insertions,
-1 deletion
| @@ -1161,18 +1161,38 @@ | |||
| 1161 | 1161 | /// version into the image, which docs/IMAGE.md describes as reporting | |
| 1162 | 1162 | /// `0.1 (Fedora 43)`. Offering it as a plain alternative sends a reader to an | |
| 1163 | 1163 | /// unstamped image for the sake of keeping four files out of a directory. | |
| 1164 | + | /// | |
| 1165 | + | /// Keyed on the mount itself rather than on the flag. The skip was | |
| 1166 | + | /// `doc.contains("-v ")`, and the manual carries zero of those: it wraps as | |
| 1167 | + | /// ``podman build -v`` then ``<dir>:/base-cache:ro`` on the next line, and | |
| 1168 | + | /// writes the flag elsewhere as ``a `-v`,``. So the one document this test | |
| 1169 | + | /// names first was skipped by its own guard and only the README was ever | |
| 1170 | + | /// asserted on, while the test read as covering both. `:/base-cache:ro` is the | |
| 1171 | + | /// mount's own spelling and survives however the line is broken. | |
| 1164 | 1172 | #[test] | |
| 1165 | 1173 | fn the_documented_mount_route_names_what_it_costs() { | |
| 1174 | + | let mut offered = Vec::new(); | |
| 1166 | 1175 | for (label, doc) in [("the manual", manual()), ("the seed README", seed_readme())] { | |
| 1167 | - | if !doc.contains("-v ") { | |
| 1176 | + | if !doc.contains(":/base-cache:ro") { | |
| 1168 | 1177 | continue; | |
| 1169 | 1178 | } | |
| 1179 | + | offered.push(label); | |
| 1170 | 1180 | assert!( | |
| 1171 | 1181 | doc.contains("build-arg") && doc.contains("stamp"), | |
| 1172 | 1182 | "{label} offers the mount route without saying that the wrapper scripts \ | |
| 1173 | 1183 | forward only --build-arg and that a bare podman build carries no stamp", | |
| 1174 | 1184 | ); | |
| 1175 | 1185 | } | |
| 1186 | + | ||
| 1187 | + | // The skip above is what made this test vacuous once already, so a | |
| 1188 | + | // document that stops offering the route says so here rather than | |
| 1189 | + | // quietly taking its assertion with it. | |
| 1190 | + | assert_eq!( | |
| 1191 | + | offered, | |
| 1192 | + | ["the manual", "the seed README"], | |
| 1193 | + | "a document stopped documenting the mount route; if that is deliberate, \ | |
| 1194 | + | drop it from this test rather than letting the skip hide it", | |
| 1195 | + | ); | |
| 1176 | 1196 | } | |
| 1177 | 1197 | ||
| 1178 | 1198 | /// The terminal's dependencies are a claim about another repository, and it |