(t *testing.T)
| 95 | } |
| 96 | |
| 97 | func TestTryCreateLockFile_AlreadyExists(t *testing.T) { |
| 98 | dir := t.TempDir() |
| 99 | path := filepath.Join(dir, "test.lock") |
| 100 | |
| 101 | require.NoError(t, tryCreateLockFile(path)) |
| 102 | |
| 103 | // second create should fail with "already exists" |
| 104 | err := tryCreateLockFile(path) |
| 105 | require.Error(t, err) |
| 106 | assert.True(t, os.IsExist(err)) |
| 107 | } |
| 108 | |
| 109 | func TestNewSelfLockContent(t *testing.T) { |
| 110 | content, err := newSelfLockContent() |
nothing calls this directly
no test coverage detected