mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-14 06:57:31 +00:00
health: add an ETag to UnhealthyState for change detection
Updates tailscale/corp#30596 Signed-off-by: James Sanderson <jsanderson@tailscale.com>
This commit is contained in:

committed by
James 'zofrex' Sanderson

parent
5154bbb0b3
commit
5731869565
@@ -1361,7 +1361,7 @@ func TestNetmapHealthIntegration(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
if d := cmp.Diff(want, got); d != "" {
|
||||
if d := cmp.Diff(want, got, cmpopts.IgnoreFields(health.UnhealthyState{}, "ETag")); d != "" {
|
||||
t.Fatalf("CurrentStatus().Warnings[\"control-health*\"] different than expected (-want +got)\n%s", d)
|
||||
}
|
||||
}
|
||||
@@ -1414,7 +1414,7 @@ func TestNetmapDisplayMessageIntegration(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
if diff := cmp.Diff(want, state.Warnings); diff != "" {
|
||||
if diff := cmp.Diff(want, state.Warnings, cmpopts.IgnoreFields(health.UnhealthyState{}, "ETag")); diff != "" {
|
||||
t.Errorf("unexpected message contents (-want +got):\n%s", diff)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user