cmd/tailscale/cli: add failing repro test #21774

This adds a test to repro the issue where tags cause justEditMP to be
nil, sending runUp into a watcher loop that waits forever for a Running
notification that never comes.

Regression appears to be shipped in v1.90.0 via b7fe1cea9, which changed
the IPN bus watcher mask from ipn.NotifyInitialState to 0.

Addresses: #21774
Signed-off-by: Zach Buchheit <[email protected]>
This commit is contained in:
Zach Buchheit committed 2026-10-13 15:25:16 -05:00
1 parent 5cc8aa7f07
commit 4a19fda975
1 file changed
+12
+12
View File
@@ -1131,6 +1131,18 @@ func TestUpdatePrefs(t *testing.T) {
wantSimpleUp: false,
wantErrSubtr: "tailscale up --accept-dns=false",
},
{
name: "just_up_running_with_tags",
flags: []string{},
curPrefs: &ipn.Prefs{
ControlURL: ipn.DefaultControlURL,
Persist: &persist.Persist{UserProfile: tailcfg.UserProfile{LoginName: "crawshaw.github"}},
AdvertiseTags: []string{"tag:dummy-test"},
},
env: upCheckEnv{backendState: "Running"},
wantSimpleUp: true,
wantJustEditMP: &ipn.MaskedPrefs{WantRunningSet: true},
},
{
name: "just_edit",
flags: []string{},