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

Function executeJSONHelpTestRoot

cmd/help_json_test.go:962–977  ·  view source on GitHub ↗
(t *testing.T, args []string)

Source from the content-addressed store, hash-verified

960}
961
962func 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
979func decodeJSONHelpOutput(t *testing.T, stdout string) jsonHelpOutputForTest {
980 t.Helper()

Calls 1

newJSONHelpTestRootFunction · 0.85

Tested by

no test coverage detected