checkPath determines if a path has been created. The test errors if it doesn't exist or doesn't match dir.
(t *testing.T, target string, dir bool)
| 69 | // checkPath determines if a path has been created. |
| 70 | // The test errors if it doesn't exist or doesn't match dir. |
| 71 | func checkPath(t *testing.T, target string, dir bool) { |
| 72 | fileInfo, err := os.Stat(target) |
| 73 | if assert.NoError(t, err) { |
| 74 | assert.True(t, fileInfo.IsDir() == dir, "should have created directory at %s", target) |
| 75 | } |
| 76 | } |