From fcc4de3e8aefa5d69d27bed140889fd5445e5de3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wilson=20J=C3=BAnior?= Date: Wed, 11 Oct 2023 10:30:47 -0300 Subject: [PATCH] plan: some text adjusts --- tsuru/client/apps.go | 4 ++-- tsuru/client/plan_test.go | 8 -------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/tsuru/client/apps.go b/tsuru/client/apps.go index 115b278f..b0c77e37 100644 --- a/tsuru/client/apps.go +++ b/tsuru/client/apps.go @@ -257,7 +257,7 @@ func (c *AppUpdate) Flags() *gnuflag.FlagSet { flagSet.Var((*cmd.StringSliceFlag)(&c.args.Tags), "g", tagMessage) flagSet.Var((*cmd.StringSliceFlag)(&c.args.Tags), "tag", tagMessage) flagSet.StringVar(&c.cpu, "cpu", "", "CPU limit for app, this will override the plan cpu value. One cpu is equivalent to 1 vCPU/Core, fractional requests are allowed and the expression 0.1 is equivalent to the expression 100m") - flagSet.StringVar(&c.cpuBurst, "cpu-burst-factor", "", "The multiplier to determine the limits of CPU burst, when value is 1 not set burst") + flagSet.StringVar(&c.cpuBurst, "cpu-burst-factor", "", "The multiplier to determine the limits of CPU burst, when the value is 1 not set burst") flagSet.StringVar(&c.memory, "memory", "", "Memory limit for app, this will override the plan memory value. You can express memory as a bytes integer or using one of these suffixes: E, P, T, G, M, K, Ei, Pi, Ti, Gi, Mi, Ki") c.fs = cmd.MergeFlagSet( @@ -306,7 +306,7 @@ func (c *AppUpdate) Run(ctx *cmd.Context, cli *cmd.Client) error { } if cpuBurst < 1 { - return errors.New("Invalid factor, please use value greater equal 1") + return errors.New("Invalid factor, please use a value greater equal 1") } c.args.Planoverride.CpuBurst = &cpuBurst diff --git a/tsuru/client/plan_test.go b/tsuru/client/plan_test.go index 2ed7f986..456bd257 100644 --- a/tsuru/client/plan_test.go +++ b/tsuru/client/plan_test.go @@ -76,7 +76,6 @@ func (s *S) TestPlanListHuman(c *check.C) { } client := cmd.NewClient(&http.Client{Transport: trans}, nil, manager) command := PlanList{} - // command.Flags().Parse(true, []string{"-h"}) err := command.Run(&context, client) c.Assert(err, check.IsNil) c.Assert(stdout.String(), check.Equals, expected) @@ -106,7 +105,6 @@ func (s *S) TestPlanListKubernetesFriendly(c *check.C) { } client := cmd.NewClient(&http.Client{Transport: trans}, nil, manager) command := PlanList{k8sFriendly: true} - // command.Flags().Parse(true, []string{"-h"}) err := command.Run(&context, client) c.Assert(err, check.IsNil) c.Assert(stdout.String(), check.Equals, expected) @@ -136,7 +134,6 @@ func (s *S) TestPlanListOverride(c *check.C) { } client := cmd.NewClient(&http.Client{Transport: trans}, nil, manager) command := PlanList{} - // command.Flags().Parse(true, []string{"-h"}) err := command.Run(&context, client) c.Assert(err, check.IsNil) c.Assert(stdout.String(), check.Equals, expected) @@ -166,7 +163,6 @@ func (s *S) TestPlanListWithBurst(c *check.C) { } client := cmd.NewClient(&http.Client{Transport: trans}, nil, manager) command := PlanList{} - // command.Flags().Parse(true, []string{"-h"}) err := command.Run(&context, client) c.Assert(err, check.IsNil) c.Assert(stdout.String(), check.Equals, expected) @@ -196,7 +192,6 @@ func (s *S) TestPlanListWithBurstKubernetesFriendly(c *check.C) { } client := cmd.NewClient(&http.Client{Transport: trans}, nil, manager) command := PlanList{k8sFriendly: true} - // command.Flags().Parse(true, []string{"-h"}) err := command.Run(&context, client) c.Assert(err, check.IsNil) c.Assert(stdout.String(), check.Equals, expected) @@ -228,7 +223,6 @@ func (s *S) TestPlanListWithBurstAndMaxAllowed(c *check.C) { command := PlanList{ showMaxBurstAllowed: true, } - // command.Flags().Parse(true, []string{"-h"}) err := command.Run(&context, client) c.Assert(err, check.IsNil) c.Assert(stdout.String(), check.Equals, expected) @@ -258,7 +252,6 @@ func (s *S) TestPlanListWithBurstOverride(c *check.C) { } client := cmd.NewClient(&http.Client{Transport: trans}, nil, manager) command := PlanList{} - // command.Flags().Parse(true, []string{"-h"}) err := command.Run(&context, client) c.Assert(err, check.IsNil) c.Assert(stdout.String(), check.Equals, expected) @@ -288,7 +281,6 @@ func (s *S) TestPlanListCPUMilli(c *check.C) { } client := cmd.NewClient(&http.Client{Transport: trans}, nil, manager) command := PlanList{} - // command.Flags().Parse(true, []string{"-h"}) err := command.Run(&context, client) c.Assert(err, check.IsNil) c.Assert(stdout.String(), check.Equals, expected)