symlinkTestFile creates a symlink, or skips the test where that needs a privilege the system doesn't grant, as on Windows by default.
(t *testing.T, target, path string)
| 1761 | // symlinkTestFile creates a symlink, or skips the test where that needs a |
| 1762 | // privilege the system doesn't grant, as on Windows by default. |
| 1763 | func symlinkTestFile(t *testing.T, target, path string) { |
| 1764 | t.Helper() |
| 1765 | require.NoError(t, os.MkdirAll(filepath.Dir(path), 0755)) |
| 1766 | if err := os.Symlink(target, path); err != nil { |
| 1767 | t.Skipf("cannot create a symlink here: %v", err) |
| 1768 | } |
| 1769 | } |
no test coverage detected