Commit c8e7263
committed
test(config): accept IOException from the atomic config-write path
The atomic-write seam (AtomicFile, introduced earlier in this change) replaces a
File.WriteAllText with a temp-write + File.Move. Writing to a path that is a
directory therefore now throws IOException ('Is a directory') from File.Move
rather than the UnauthorizedAccessException that File.WriteAllText raised, so
SubmitCurrentConfigurationAsync_surfaces_persistence_exception_to_awaited_caller
asserted the wrong exact type.
The test's contract is that the awaited path surfaces (does not swallow) a
persistence failure. Assert that a persistence IO exception propagates — either
IOException or UnauthorizedAccessException, robust across OS/write mechanism — while
still rejecting an unexpected exception type. Production write surfaces already
catch both types, so there is no runtime gap.1 parent 9ce209b commit c8e7263
1 file changed
Lines changed: 8 additions & 1 deletion
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
154 | 159 | | |
| 160 | + | |
| 161 | + | |
155 | 162 | | |
156 | 163 | | |
157 | 164 | | |
| |||
0 commit comments