(t *testing.T)
| 557 | } |
| 558 | |
| 559 | func TestJSONHelpAuthModeInferenceUsesTopLevelTeam(t *testing.T) { |
| 560 | root := &cobra.Command{Use: "dbxcli"} |
| 561 | tools := &cobra.Command{Use: "tools"} |
| 562 | nestedTeam := &cobra.Command{ |
| 563 | Use: "team", |
| 564 | RunE: func(cmd *cobra.Command, args []string) error { return nil }, |
| 565 | } |
| 566 | root.AddCommand(tools) |
| 567 | tools.AddCommand(nestedTeam) |
| 568 | |
| 569 | assertStringSliceEqual( |
| 570 | t, |
| 571 | "nested non-top-level team auth modes", |
| 572 | commandManifestAuthModes(nestedTeam), |
| 573 | []string{"personal", "team-access"}, |
| 574 | ) |
| 575 | } |
| 576 | |
| 577 | func TestJSONHelpAuthModeAnnotationOverridesInference(t *testing.T) { |
| 578 | root := &cobra.Command{Use: "dbxcli"} |
nothing calls this directly
no test coverage detected