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

Function TestJSONHelpAuthModeAnnotationOverridesInference

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

Source from the content-addressed store, hash-verified

575}
576
577func TestJSONHelpAuthModeAnnotationOverridesInference(t *testing.T) {
578 root := &cobra.Command{Use: "dbxcli"}
579 cmd := &cobra.Command{
580 Use: "custom",
581 RunE: func(cmd *cobra.Command, args []string) error { return nil },
582 }
583 root.AddCommand(cmd)
584 setCommandAuthModes(cmd, "team-manage")
585
586 assertStringSliceEqual(
587 t,
588 "explicit auth modes",
589 commandManifestAuthModes(cmd),
590 []string{"team-manage"},
591 )
592}
593
594func TestJSONHelpAuthBypassRequiresInstalledHelpCommand(t *testing.T) {
595 root := &cobra.Command{Use: "dbxcli"}

Callers

nothing calls this directly

Calls 3

setCommandAuthModesFunction · 0.85
assertStringSliceEqualFunction · 0.85
commandManifestAuthModesFunction · 0.85

Tested by

no test coverage detected