Skip to content

Commit

Permalink
test: add MultiregionMinJob mock (#17614) (#17616)
Browse files Browse the repository at this point in the history
Co-authored-by: Luiz Aoqui <luiz@hashicorp.com>
  • Loading branch information
hc-github-team-nomad-core and lgfa29 committed Jun 20, 2023
1 parent 158b5a2 commit 6f54697
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions nomad/mock/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,23 @@ func MinJob() *structs.Job {
job.Canonicalize()
return job
}

func MultiregionMinJob() *structs.Job {
job := MinJob()
update := *structs.DefaultUpdateStrategy
job.Update = update
job.TaskGroups[0].Update = &update
job.Multiregion = &structs.Multiregion{
Regions: []*structs.MultiregionRegion{
{
Name: "west",
Count: 1,
},
{
Name: "east",
Count: 1,
},
},
}
return job
}

0 comments on commit 6f54697

Please sign in to comment.