mirror of
https://github.com/tailscale/tailscale.git
synced 2026-05-05 20:26:47 +02:00
health: fix TestControlHealthNotifies on release branches
Currently, TestControlHealthNotifies expects three initial health-change events, including is-using-unstable-version, regardless of whether tests run on an unstable or release branch. This change makes the is-using-unstable-version check conditional. Fixes #17635 Signed-off-by: Nick Khyl <nickk@tailscale.com>
This commit is contained in:
parent
8576a802ca
commit
f018a16540
@ -741,11 +741,18 @@ func TestControlHealthNotifies(t *testing.T) {
|
||||
|
||||
// Expect events at starup, before doing anything else
|
||||
synctest.Wait()
|
||||
if err := eventbustest.ExpectExactly(tw,
|
||||
initialEvents := []any{
|
||||
eventbustest.Type[Change](), // warming-up
|
||||
eventbustest.Type[Change](), // is-using-unstable-version
|
||||
}
|
||||
if version.IsUnstableBuild() {
|
||||
initialEvents = append(initialEvents,
|
||||
eventbustest.Type[Change](), // is-using-unstable-version
|
||||
)
|
||||
}
|
||||
initialEvents = append(initialEvents,
|
||||
eventbustest.Type[Change](), // not-in-map-poll
|
||||
); err != nil {
|
||||
)
|
||||
if err := eventbustest.ExpectExactly(tw, initialEvents...); err != nil {
|
||||
t.Errorf("startup error: %v", err)
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user