diff --git a/internal/cmd/compute/access/access.go b/internal/cmd/compute/access/access.go index 7a492426..c802b1e4 100644 --- a/internal/cmd/compute/access/access.go +++ b/internal/cmd/compute/access/access.go @@ -80,7 +80,9 @@ func requestCommand() *cobra.Command { Use: "request", Short: "Request Compute service access for the current project", Long: "Submit a request to enable the Compute service for the current " + - "project. Approval may be a manual step by the service provider.", + "project. A self-service Compute service enables access automatically, " + + "normally within a few seconds. Otherwise the request waits for the " + + "service provider to approve it.", Args: util.NoPositionalArgs, RunE: func(cmd *cobra.Command, _ []string) error { project := util.ProjectFromCmd(cmd) @@ -111,9 +113,9 @@ func requestCommand() *cobra.Command { } util.MarkGateExempt(cmd) - cmd.Flags().StringVar(&message, "message", "", "Justification sent to the service provider with the request") + cmd.Flags().StringVar(&message, "message", "", "Justification for the service provider, read when it approves requests by hand") cmd.Flags().BoolVar(&renew, "renew", false, "Delete a denied or revoked request and submit a new one") - cmd.Flags().BoolVar(&wait, "wait", false, "Wait until access becomes active (approval is a manual provider step)") + cmd.Flags().BoolVar(&wait, "wait", false, "Wait until Compute setup completes") cmd.Flags().DurationVar(&timeout, "timeout", 30*time.Minute, "Maximum time to wait when --wait is set") return cmd diff --git a/internal/cmd/compute/access/access_test.go b/internal/cmd/compute/access/access_test.go new file mode 100644 index 00000000..e7bf12d9 --- /dev/null +++ b/internal/cmd/compute/access/access_test.go @@ -0,0 +1,27 @@ +package access + +import ( + "strings" + "testing" +) + +func TestRequestHelpDoesNotPromiseManualApproval(t *testing.T) { + cmd := requestCommand() + texts := []string{ + cmd.Short, + cmd.Long, + cmd.Flags().Lookup("wait").Usage, + cmd.Flags().Lookup("message").Usage, + } + for _, text := range texts { + lower := strings.ToLower(text) + for _, claim := range []string{"manual", "someone reviews", "a person reviews", "reviews this by hand"} { + if strings.Contains(lower, claim) { + t.Errorf("help says approval is manual (%q): %q", claim, text) + } + } + } + if !strings.Contains(cmd.Long, "self-service") { + t.Errorf("help does not describe self-service access: %q", cmd.Long) + } +}