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

Function TestJSONHelpDoesNotRequireAuth

cmd/help_json_test.go:547–557  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

545}
546
547func TestJSONHelpDoesNotRequireAuth(t *testing.T) {
548 t.Setenv(envAccessToken, "")
549 t.Setenv(envAuthFile, filepath.Join(t.TempDir(), "missing-auth.json"))
550
551 stdout, stderr, err := executeJSONHelpTestRoot(t, []string{"help", "ls", "--output=json"})
552 if err != nil {
553 t.Fatalf("Execute returned error: %v\nstdout: %s\nstderr: %s", err, stdout, stderr)
554 }
555 got := decodeJSONHelpOutput(t, stdout)
556 assertJSONHelpResultPaths(t, got, []string{"ls"})
557}
558
559func TestJSONHelpAuthModeInferenceUsesTopLevelTeam(t *testing.T) {
560 root := &cobra.Command{Use: "dbxcli"}

Callers

nothing calls this directly

Calls 3

executeJSONHelpTestRootFunction · 0.85
decodeJSONHelpOutputFunction · 0.85

Tested by

no test coverage detected