mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
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:
@@ -37,7 +37,7 @@ func TestCompose(t *testing.T) {
|
||||
AddTask(task)
|
||||
|
||||
// Compose a job
|
||||
job := NewServiceJob("job1", "myjob", "region1", 2).
|
||||
job := NewServiceJob("job1", "myjob", "global", 2).
|
||||
SetMeta("foo", "bar").
|
||||
AddDatacenter("dc1").
|
||||
Constrain(NewConstraint("kernel.name", "=", "linux")).
|
||||
@@ -45,7 +45,7 @@ func TestCompose(t *testing.T) {
|
||||
|
||||
// Check that the composed result looks correct
|
||||
expect := &Job{
|
||||
Region: stringToPtr("region1"),
|
||||
Region: stringToPtr("global"),
|
||||
ID: stringToPtr("job1"),
|
||||
Name: stringToPtr("myjob"),
|
||||
Type: stringToPtr(JobTypeService),
|
||||
|
||||
Reference in New Issue
Block a user