(t *testing.T)
| 575 | } |
| 576 | |
| 577 | func 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 | |
| 594 | func TestJSONHelpAuthBypassRequiresInstalledHelpCommand(t *testing.T) { |
| 595 | root := &cobra.Command{Use: "dbxcli"} |
nothing calls this directly
no test coverage detected