(t *testing.T)
| 545 | } |
| 546 | |
| 547 | func 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 | |
| 559 | func TestJSONHelpAuthModeInferenceUsesTopLevelTeam(t *testing.T) { |
| 560 | root := &cobra.Command{Use: "dbxcli"} |
nothing calls this directly
no test coverage detected