Skip to content

Commit

Permalink
testing: fix the job type of the example service job
Browse files Browse the repository at this point in the history
  • Loading branch information
shoenig committed Nov 21, 2024
1 parent a9e7166 commit ccd00da
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion command/alloc_checks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func TestAllocChecksCommand_Run(t *testing.T) {
waitForNodes(t, client)

jobID := "job1_checks"
job1 := testNomadServiceJob(jobID)
job1 := testServiceJob(jobID)

resp, _, err := client.Jobs().Register(job1, nil)
must.NoError(t, err)
Expand Down
2 changes: 1 addition & 1 deletion command/alloc_status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ func TestAllocStatusCommand_NSD_Checks(t *testing.T) {
waitForNodes(t, client)

jobID := "job1_checks"
job1 := testNomadServiceJob(jobID)
job1 := testServiceJob(jobID)

resp, _, err := client.Jobs().Register(job1, nil)
must.NoError(t, err)
Expand Down
3 changes: 2 additions & 1 deletion command/testing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ func testJob(jobID string) *api.Job {
return job
}

func testNomadServiceJob(jobID string) *api.Job {
func testServiceJob(jobID string) *api.Job {
j := testJob(jobID)
j.Type = pointer.Of("service")
j.TaskGroups[0].Services = []*api.Service{{
Name: "service1",
PortLabel: "1000",
Expand Down

0 comments on commit ccd00da

Please sign in to comment.