(t *testing.T)
| 42 | } |
| 43 | |
| 44 | func TestIsLockFileStale_EmptyFile(t *testing.T) { |
| 45 | // backward compat: old lock files are empty |
| 46 | dir := t.TempDir() |
| 47 | path := filepath.Join(dir, "test.lock") |
| 48 | require.NoError(t, os.WriteFile(path, []byte{}, 0600)) |
| 49 | |
| 50 | stale, _, err := isLockFileStale(path) |
| 51 | require.NoError(t, err) |
| 52 | assert.True(t, stale) |
| 53 | } |
| 54 | |
| 55 | func TestIsLockFileStale_CorruptFile(t *testing.T) { |
| 56 | dir := t.TempDir() |
nothing calls this directly
no test coverage detected