Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for IsJobFinished (0.11 sec)

  1. pkg/controller/job/util/utils.go

    			return true, c.Type
    		}
    	}
    	return false, ""
    }
    
    // IsJobFinished checks whether the given Job has finished execution.
    // It does not discriminate between successful and failed terminations.
    func IsJobFinished(j *batch.Job) bool {
    	isFinished, _ := FinishedCondition(j)
    	return isFinished
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 07 09:27:46 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  2. pkg/controller/job/util/utils_test.go

    	for name, test := range tests {
    		t.Run(name, func(t *testing.T) {
    			job := &batch.Job{
    				Status: batch.JobStatus{
    					Conditions: test.conditions,
    				},
    			}
    
    			isJobFinished, conditionType := FinishedCondition(job)
    			if isJobFinished != test.wantJobFinished {
    				if test.wantJobFinished {
    					t.Error("Expected the job to be finished")
    				} else {
    					t.Error("Expected the job to be unfinished")
    				}
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 07 09:27:46 UTC 2024
    - 4.7K bytes
    - Viewed (0)
Back to top