Commit 9fdbeb5
test: fix vacuous and incomplete assertions in fuzzy_schedule and dotnet (#906)
fuzzy_schedule.rs:
- test_cron_format: add assertions that day-of-month, month, and
day-of-week fields are '*' for a Daily schedule. Without these, a
regression that added a day-of-week or day-of-month constraint would
silently turn a daily schedule into a weekly or monthly one.
- test_generate_schedule_yaml / test_generate_schedule_yaml_with_branches:
add 'assert!(yaml.contains("always: true"))'. The 'always: true' flag
is load-bearing — without it ADO only fires the schedule when the
target branch has new commits, silently skipping unconditional runs.
Removing it from the template would pass the old tests undetected.
dotnet/extension.rs:
- Remove test_validate_global_json_sentinel_skips_injection_check.
The assertion 'is_ok()' is vacuous: 'global.json' contains no
injection characters, so validate() returns Ok regardless of whether
the sentinel bypass exists. The stronger
test_validate_global_json_sentinel_accepted_with_file_present already
covers the meaningful scenario (compile_dir contains global.json,
sentinel version resolves the conflict).
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 e83cd60 commit 9fdbeb5
2 files changed
Lines changed: 12 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
954 | 954 | | |
955 | 955 | | |
956 | 956 | | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
957 | 964 | | |
958 | 965 | | |
959 | 966 | | |
| |||
991 | 998 | | |
992 | 999 | | |
993 | 1000 | | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
994 | 1005 | | |
995 | 1006 | | |
996 | 1007 | | |
| |||
1001 | 1012 | | |
1002 | 1013 | | |
1003 | 1014 | | |
| 1015 | + | |
1004 | 1016 | | |
1005 | 1017 | | |
1006 | 1018 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | 204 | | |
216 | 205 | | |
217 | 206 | | |
| |||
0 commit comments