Skip to content

Commit

Permalink
plan: some text adjusts
Browse files Browse the repository at this point in the history
  • Loading branch information
wpjunior committed Oct 11, 2023
1 parent aff0e33 commit fcc4de3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
4 changes: 2 additions & 2 deletions tsuru/client/apps.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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
Expand Down
8 changes: 0 additions & 8 deletions tsuru/client/plan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit fcc4de3

Please sign in to comment.