From 59271c668e7e79e9b2e9a0783912fce87812e417 Mon Sep 17 00:00:00 2001 From: Chris Baker <1675087+cgbaker@users.noreply.github.com> Date: Fri, 8 Jan 2021 19:38:25 +0000 Subject: [PATCH] appease the linter and fix an incorrect test --- api/util_test.go | 2 +- nomad/job_endpoint.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/util_test.go b/api/util_test.go index 5c0fd524f..7e5f2e1b5 100644 --- a/api/util_test.go +++ b/api/util_test.go @@ -53,7 +53,7 @@ func testJobWithScalingPolicy() *Job { job.TaskGroups[0].Scaling = &ScalingPolicy{ Policy: map[string]interface{}{}, Min: int64ToPtr(1), - Max: int64ToPtr(1), + Max: int64ToPtr(5), Enabled: boolToPtr(true), } return job diff --git a/nomad/job_endpoint.go b/nomad/job_endpoint.go index 01cc43437..146fa30d4 100644 --- a/nomad/job_endpoint.go +++ b/nomad/job_endpoint.go @@ -1043,11 +1043,11 @@ func (j *Job) Scale(args *structs.JobScaleRequest, reply *structs.JobRegisterRes if found.Scaling != nil { if *args.Count < found.Scaling.Min { return structs.NewErrRPCCoded(400, - fmt.Sprintf("new scaling count cannot be less than the scaling policy minimum")) + "new scaling count cannot be less than the scaling policy minimum") } if found.Scaling.Max < *args.Count { return structs.NewErrRPCCoded(400, - fmt.Sprintf("new scaling count cannot be greater than the scaling policy maximum")) + "new scaling count cannot be greater than the scaling policy maximum") } }