MCPcopy Index your code
hub / github.com/cloudflare/cloudflared / TestIsLockFileStale_CorruptFile

Function TestIsLockFileStale_CorruptFile

token/lockfile_test.go:55–63  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

53}
54
55func TestIsLockFileStale_CorruptFile(t *testing.T) {
56 dir := t.TempDir()
57 path := filepath.Join(dir, "test.lock")
58 require.NoError(t, os.WriteFile(path, []byte("not json"), 0600))
59
60 stale, _, err := isLockFileStale(path)
61 require.NoError(t, err)
62 assert.True(t, stale)
63}
64
65func TestReadAuthURL_Exists(t *testing.T) {
66 dir := t.TempDir()

Callers

nothing calls this directly

Calls 1

isLockFileStaleFunction · 0.85

Tested by

no test coverage detected