Skip to content

Commit

Permalink
backport of commit 31f53ce
Browse files Browse the repository at this point in the history
  • Loading branch information
tgross authored Mar 29, 2024
1 parent e8da6cb commit e7ae406
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion nomad/structs/structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2871,7 +2871,7 @@ func (d *DNSConfig) IsZero() bool {
if d == nil {
return true
}
return len(d.Options) == 0 || len(d.Searches) == 0 || len(d.Servers) == 0
return len(d.Options) == 0 && len(d.Searches) == 0 && len(d.Servers) == 0
}

// NetworkResource is used to represent available network
Expand Down
1 change: 1 addition & 0 deletions nomad/structs/structs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7580,6 +7580,7 @@ func TestDNSConfig_Equal(t *testing.T) {

must.Equal[*DNSConfig](t, nil, nil)
must.NotEqual[*DNSConfig](t, nil, new(DNSConfig))
must.NotEqual[*DNSConfig](t, nil, &DNSConfig{Servers: []string{"8.8.8.8"}})

must.StructEqual(t, &DNSConfig{
Servers: []string{"8.8.8.8", "8.8.4.4"},
Expand Down

0 comments on commit e7ae406

Please sign in to comment.