Skip to content

Commit

Permalink
add test case for continuous paused jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyas-goenka committed Oct 22, 2024
1 parent 037ded9 commit 09e1291
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions bundle/run/job_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ func TestJobRunnerCancelWithNoActiveRuns(t *testing.T) {
require.NoError(t, err)
}

func TestJobRunnerRestart(t *testing.T) {
func runJobRunnerRestartTest(t *testing.T, jobSettings *jobs.JobSettings) {
job := &resources.Job{
ID: "123",
JobSettings: &jobs.JobSettings{},
JobSettings: jobSettings,
}
b := &bundle.Bundle{
Config: config.Root{
Expand Down Expand Up @@ -196,6 +196,19 @@ func TestJobRunnerRestart(t *testing.T) {
require.NoError(t, err)
}

func TestJobRunnerRestart(t *testing.T) {
for _, jobSettings := range []*jobs.JobSettings{
{},
{
Continuous: &jobs.Continuous{
PauseStatus: jobs.PauseStatusPaused,
},
},
} {
runJobRunnerRestartTest(t, jobSettings)
}
}

func TestJobRunnerRestartForContinuousUnpausedJobs(t *testing.T) {
job := &resources.Job{
ID: "123",
Expand Down

0 comments on commit 09e1291

Please sign in to comment.