diff --git a/nomad/structs/diff_test.go b/nomad/structs/diff_test.go index 5bf1c0a24..dd1a335c9 100644 --- a/nomad/structs/diff_test.go +++ b/nomad/structs/diff_test.go @@ -515,6 +515,7 @@ func TestJobDiff(t *testing.T) { Spec: "*/15 * * * * *", SpecType: "foo", ProhibitOverlap: false, + TimeZone: "Europe/Minsk", }, }, Expected: &JobDiff{ @@ -548,6 +549,12 @@ func TestJobDiff(t *testing.T) { Old: "", New: "foo", }, + { + Type: DiffTypeAdded, + Name: "TimeZone", + Old: "", + New: "Europe/Minsk", + }, }, }, }, @@ -561,6 +568,7 @@ func TestJobDiff(t *testing.T) { Spec: "*/15 * * * * *", SpecType: "foo", ProhibitOverlap: false, + TimeZone: "Europe/Minsk", }, }, New: &Job{}, @@ -595,6 +603,12 @@ func TestJobDiff(t *testing.T) { Old: "foo", New: "", }, + { + Type: DiffTypeDeleted, + Name: "TimeZone", + Old: "Europe/Minsk", + New: "", + }, }, }, }, @@ -608,6 +622,7 @@ func TestJobDiff(t *testing.T) { Spec: "*/15 * * * * *", SpecType: "foo", ProhibitOverlap: false, + TimeZone: "Europe/Minsk", }, }, New: &Job{ @@ -616,6 +631,7 @@ func TestJobDiff(t *testing.T) { Spec: "* * * * * *", SpecType: "cron", ProhibitOverlap: true, + TimeZone: "America/Los_Angeles", }, }, Expected: &JobDiff{ @@ -649,6 +665,12 @@ func TestJobDiff(t *testing.T) { Old: "foo", New: "cron", }, + { + Type: DiffTypeEdited, + Name: "TimeZone", + Old: "Europe/Minsk", + New: "America/Los_Angeles", + }, }, }, }, @@ -663,6 +685,7 @@ func TestJobDiff(t *testing.T) { Spec: "*/15 * * * * *", SpecType: "foo", ProhibitOverlap: false, + TimeZone: "Europe/Minsk", }, }, New: &Job{ @@ -671,6 +694,7 @@ func TestJobDiff(t *testing.T) { Spec: "* * * * * *", SpecType: "foo", ProhibitOverlap: false, + TimeZone: "Europe/Minsk", }, }, Expected: &JobDiff{ @@ -704,6 +728,12 @@ func TestJobDiff(t *testing.T) { Old: "foo", New: "foo", }, + { + Type: DiffTypeNone, + Name: "TimeZone", + Old: "Europe/Minsk", + New: "Europe/Minsk", + }, }, }, },