Commit de0c8d5
test: fix vacuous and weak assertions in ir/step.rs and ir/job.rs (#1070)
- job.rs / pool_variants_are_distinct: vacuous — different enum variants
with #[derive(PartialEq)] are always unequal; renamed to
pool_same_variant_different_values_are_not_equal and rewrote to test
same-variant field discrimination (VmImage/Named with differing values
are unequal; identical values are equal).
- step.rs / bash_step_builder_round_trip: weak — env.len()==1 only
counts entries without verifying the stored key or value; added
env.get("FOO") == Some(&EnvValue::literal("bar")) and
outputs[0].name == "AW_OUT" to verify actual content.
- job.rs / new_starts_empty_depends_on_and_steps: incomplete — the
analogous stage.rs test checks four fields; added condition.is_none(),
variables.is_empty(), template_dependson_wrap.is_none(), and
template_context.is_none() to match that coverage.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent ca0352c commit de0c8d5
2 files changed
Lines changed: 37 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
| 214 | + | |
| 215 | + | |
215 | 216 | | |
216 | | - | |
217 | | - | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
218 | 227 | | |
219 | 228 | | |
220 | 229 | | |
221 | | - | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
222 | 235 | | |
223 | 236 | | |
224 | 237 | | |
| |||
228 | 241 | | |
229 | 242 | | |
230 | 243 | | |
231 | | - | |
232 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
233 | 256 | | |
234 | 257 | | |
235 | 258 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
242 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
243 | 249 | | |
244 | 250 | | |
245 | 251 | | |
| |||
0 commit comments