MCPcopy Create free account
hub / github.com/dropbox/dbxcli / TestAuthFilePathUsesEnv

Function TestAuthFilePathUsesEnv

cmd/auth_test.go:41–52  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

39}
40
41func TestAuthFilePathUsesEnv(t *testing.T) {
42 authFile := filepath.Join(t.TempDir(), "custom-auth.json")
43 t.Setenv(envAuthFile, authFile)
44
45 path, err := authFilePath()
46 if err != nil {
47 t.Fatal(err)
48 }
49 if path != authFile {
50 t.Fatalf("expected auth file %q, got %q", authFile, path)
51 }
52}
53
54func TestReadTokensReadsTokenMap(t *testing.T) {
55 authFile := filepath.Join(t.TempDir(), "auth.json")

Callers

nothing calls this directly

Calls 1

authFilePathFunction · 0.85

Tested by

no test coverage detected