Skip to content

Commit

Permalink
diff!
Browse files Browse the repository at this point in the history
  • Loading branch information
schmichael committed Aug 28, 2023
1 parent 85937b5 commit b8bae3e
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions nomad/structs/diff_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8088,6 +8088,12 @@ func TestTaskDiff(t *testing.T) {
Old: "",
New: "false",
},
{
Type: DiffTypeAdded,
Name: "TTL",
Old: "",
New: "0",
},
},
},
},
Expand Down Expand Up @@ -8118,6 +8124,12 @@ func TestTaskDiff(t *testing.T) {
Name: "File",
Old: "false",
},
{
Type: DiffTypeDeleted,
Name: "TTL",
Old: "0",
New: "",
},
},
},
},
Expand Down Expand Up @@ -8176,6 +8188,7 @@ func TestTaskDiff(t *testing.T) {
Name: "vault",
Audience: []string{"vault.io"},
File: true,
TTL: time.Hour,
},
},
},
Expand Down Expand Up @@ -8218,6 +8231,12 @@ func TestTaskDiff(t *testing.T) {
Old: "",
New: "vault",
},
{
Type: DiffTypeAdded,
Name: "TTL",
Old: "",
New: "3600000000000",
},
},
},
},
Expand All @@ -8232,6 +8251,7 @@ func TestTaskDiff(t *testing.T) {
Audience: []string{"consul.io"},
Env: true,
File: false,
TTL: time.Hour,
},
{
Name: "vault",
Expand All @@ -8247,13 +8267,15 @@ func TestTaskDiff(t *testing.T) {
Audience: []string{"consul-prod.io"},
Env: false,
File: true,
TTL: 2 * time.Hour,
},
{
// Modifying the previous block to be deleted and a new
// one to be created.
Name: "vault-dev",
Audience: []string{"vault.io"},
File: true,
TTL: time.Hour,
},
},
},
Expand Down Expand Up @@ -8296,6 +8318,12 @@ func TestTaskDiff(t *testing.T) {
Old: "false",
New: "true",
},
{
Type: DiffTypeEdited,
Name: "TTL",
Old: "3600000000000",
New: "7200000000000",
},
},
},
{
Expand Down Expand Up @@ -8334,6 +8362,12 @@ func TestTaskDiff(t *testing.T) {
Old: "",
New: "vault-dev",
},
{
Type: DiffTypeAdded,
Name: "TTL",
Old: "",
New: "3600000000000",
},
},
},
{
Expand Down Expand Up @@ -8372,6 +8406,12 @@ func TestTaskDiff(t *testing.T) {
Old: "vault",
New: "",
},
{
Type: DiffTypeDeleted,
Name: "TTL",
Old: "0",
New: "",
},
},
},
},
Expand Down

0 comments on commit b8bae3e

Please sign in to comment.