MCPcopy Create free account
hub / github.com/cli/cli / TestFlockRefreshLockCreatesMissingDirectory

Function TestFlockRefreshLockCreatesMissingDirectory

internal/config/refreshable_test.go:771–779  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

769}
770
771func TestFlockRefreshLockCreatesMissingDirectory(t *testing.T) {
772 path := filepath.Join(t.TempDir(), "state", "gh", refreshLockFile)
773
774 unlock, err := flockRefreshLock(t.Context(), path)
775 require.NoError(t, err)
776 defer unlock()
777
778 require.FileExists(t, path)
779}
780
781func TestWithFreshConfigUnderLockProceedsWhenStateDirCannotBeCreated(t *testing.T) {
782 // If we have reached a refresh, the environment is already set up enough to proceed. A read-only mount (or any

Callers

nothing calls this directly

Calls 2

flockRefreshLockFunction · 0.85
JoinMethod · 0.80

Tested by

no test coverage detected