Skip to content

Commit

Permalink
Replace IsSuspend() with IsSuspended()
Browse files Browse the repository at this point in the history
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
  • Loading branch information
tenzen-y committed Jul 13, 2023
1 parent a170326 commit c1af716
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/controller.v1/common/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (jc *JobController) ReconcileJobs(
}
return nil
}
if commonutil.IsSuspend(jobStatus) {
if commonutil.IsSuspended(jobStatus) {
msg := fmt.Sprintf("%s %s is resumed.", jobKind, jobName)
if err = commonutil.UpdateJobConditions(&jobStatus, apiv1.JobSuspended, corev1.ConditionFalse,
commonutil.NewReason(jobKind, commonutil.JobResumedReason), msg); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/util/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func IsRunning(status apiv1.JobStatus) bool {
return hasCondition(status, apiv1.JobRunning)
}

func IsSuspend(status apiv1.JobStatus) bool {
func IsSuspended(status apiv1.JobStatus) bool {
return hasCondition(status, apiv1.JobSuspended)
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/util/status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func TestIsSuspend(t *testing.T) {
},
},
}
assert.True(t, IsSuspend(jobStatus))
assert.True(t, IsSuspended(jobStatus))
}

func TestUpdateJobConditions(t *testing.T) {
Expand Down

0 comments on commit c1af716

Please sign in to comment.