MCPcopy
hub / github.com/cloudflare/cloudflared / TestReadAuthURL_Exists

Function TestReadAuthURL_Exists

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

Source from the content-addressed store, hash-verified

63}
64
65func TestReadAuthURL_Exists(t *testing.T) {
66 dir := t.TempDir()
67 tokenPath := filepath.Join(dir, "token")
68 url := "https://example.com/cdn-cgi/access/cli?token=abc123"
69 require.NoError(t, os.WriteFile(tokenPath+".url", []byte(url), 0600))
70
71 assert.Equal(t, url, readAuthURL(tokenPath))
72}
73
74func TestReadAuthURL_NotExists(t *testing.T) {
75 dir := t.TempDir()

Callers

nothing calls this directly

Calls 2

readAuthURLFunction · 0.85
EqualMethod · 0.65

Tested by

no test coverage detected