Commit d98a8c5
committed
testutil/daemon: fail gracefully if DEST is unset
If neither of the DOCKER_INTEGRATION_DAEMON_DEST or DEST environment
variables are set, integration tests panic with a nil-dereference panic
in os.(*File).Name(...). This is a very unhelpful behaviour for someone
trying to run integration tests interactively. Fix up the logic to avoid
dereferencing nil os.File pointers and instead fail the test immediately
with an actionable error message.
Signed-off-by: Cory Snider <csnider@mirantis.com>1 parent 8995619 commit d98a8c5
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| 219 | + | |
219 | 220 | | |
220 | 221 | | |
221 | | - | |
222 | | - | |
223 | 222 | | |
224 | 223 | | |
225 | 224 | | |
| |||
412 | 411 | | |
413 | 412 | | |
414 | 413 | | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
415 | 417 | | |
416 | 418 | | |
417 | 419 | | |
| |||
0 commit comments