backfill region from job hcl in jobUpdate and jobPlan endpoints

- updated region in job metadata that gets persisted to nomad datastore
- fixed many unrelated unit tests that used an invalid region value
(they previously passed because hcl wasn't getting picked up and
the job would default to global region)
This commit is contained in:
Jasmine Dahilig
2019-05-02 13:00:21 -07:00
parent 01c267b92b
commit c467a94e2b
13 changed files with 210 additions and 22 deletions

View File

@@ -109,3 +109,9 @@ func MockPeriodicJob() *api.Job {
}
return j
}
func MockRegionalJob() *api.Job {
j := MockJob()
j.Region = helper.StringToPtr("north-america")
return j
}