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

Function TestFlockRefreshLockCreatesMissingDirectory

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

Source from the content-addressed store, hash-verified

930}
931
932func TestFlockRefreshLockCreatesMissingDirectory(t *testing.T) {
933 path := filepath.Join(t.TempDir(), "state", "gh", refreshLockFile)
934
935 unlock, err := flockRefreshLock(t.Context(), path)
936 require.NoError(t, err)
937 defer unlock()
938
939 require.FileExists(t, path)
940}
941
942func TestWithFreshConfigUnderLockProceedsWhenStateDirCannotBeCreated(t *testing.T) {
943 // 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