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") } }