(t *testing.T, args []string)
| 960 | } |
| 961 | |
| 962 | func executeJSONHelpTestRoot(t *testing.T, args []string) (string, string, error) { |
| 963 | t.Helper() |
| 964 | |
| 965 | t.Setenv(envAccessToken, "") |
| 966 | t.Setenv(envAuthFile, filepath.Join(t.TempDir(), "missing-auth.json")) |
| 967 | |
| 968 | var stdout bytes.Buffer |
| 969 | var stderr bytes.Buffer |
| 970 | root := newJSONHelpTestRoot(t) |
| 971 | root.SetOut(&stdout) |
| 972 | root.SetErr(&stderr) |
| 973 | root.SetArgs(args) |
| 974 | |
| 975 | err := root.Execute() |
| 976 | return stdout.String(), stderr.String(), err |
| 977 | } |
| 978 | |
| 979 | func decodeJSONHelpOutput(t *testing.T, stdout string) jsonHelpOutputForTest { |
| 980 | t.Helper() |
no test coverage detected