Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
Add test for SCHED_BATCH
Browse files Browse the repository at this point in the history
  • Loading branch information
sargun committed Jun 6, 2018
1 parent 9a599d4 commit cde44e8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions executor/mock/standalone/standalone_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ func TestStandalone(t *testing.T) {
testTerminateTimeoutNotTooSlow,
testOOMAdj,
testOOMKill,
testSchedBatch,
}
for _, fun := range testFunctions {
fullName := runtime.FuncForPC(reflect.ValueOf(fun).Pointer()).Name()
Expand Down Expand Up @@ -575,3 +576,15 @@ func testOOMKill(t *testing.T, jobID string) {
}
t.Fail()
}

func testSchedBatch(t *testing.T, jobID string) {
ji := &mock.JobInput{
ImageName: ubuntu.name,
Version: ubuntu.tag,
Entrypoint: `/bin/bash -c 'schedtool 0 | grep SCHED_BATCH | grep 19'`,
JobID: jobID,
}
if !mock.RunJobExpectingSuccess(ji) {
t.Fail()
}
}

0 comments on commit cde44e8

Please sign in to comment.