Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing: fix the job type of the example service job #24529

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading