File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import (
1414 "tailscale.com/tailcfg"
1515 "tailscale.com/types/opt"
1616 "tailscale.com/util/usermetric"
17+ "tailscale.com/version"
1718)
1819
1920func TestAppendWarnableDebugFlags (t * testing.T ) {
@@ -352,6 +353,11 @@ func TestShowUpdateWarnable(t *testing.T) {
352353}
353354
354355func TestHealthMetric (t * testing.T ) {
356+ unstableBuildWarning := 0
357+ if version .IsUnstableBuild () {
358+ unstableBuildWarning = 1
359+ }
360+
355361 tests := []struct {
356362 desc string
357363 check bool
@@ -361,20 +367,20 @@ func TestHealthMetric(t *testing.T) {
361367 }{
362368 // When running in dev, and not initialising the client, there will be two warnings
363369 // by default:
364- // - is-using-unstable-version
370+ // - is-using-unstable-version (except on the release branch)
365371 // - wantrunning-false
366372 {
367373 desc : "base-warnings" ,
368374 check : true ,
369375 cv : nil ,
370- wantMetricCount : 2 ,
376+ wantMetricCount : unstableBuildWarning + 1 ,
371377 },
372378 // with: update-available
373379 {
374380 desc : "update-warning" ,
375381 check : true ,
376382 cv : & tailcfg.ClientVersion {RunningLatest : false , LatestVersion : "1.2.3" },
377- wantMetricCount : 3 ,
383+ wantMetricCount : unstableBuildWarning + 2 ,
378384 },
379385 }
380386 for _ , tt := range tests {
You can’t perform that action at this time.
0 commit comments