cmd/tailscale/cli: add test for already-submitted #1777

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick 2021-04-23 10:56:08 -07:00
parent 8d7f7fc7ce
commit d94ed7310b

View File

@ -272,6 +272,22 @@ func TestCheckForAccidentalSettingReverts(t *testing.T) {
},
want: "'tailscale up' without --reset requires all preferences with changing values to be explicitly mentioned; --advertise-exit-node flag not mentioned but currently advertised routes are an exit node",
},
{
name: "exit_node_clearing", // Issue 1777
flagSet: f("exit-node"),
curPrefs: &ipn.Prefs{
ControlURL: ipn.DefaultControlURL,
ExitNodeID: "fooID",
},
mp: &ipn.MaskedPrefs{
Prefs: ipn.Prefs{
ControlURL: ipn.DefaultControlURL,
ExitNodeIP: netaddr.IP{},
},
ExitNodeIPSet: true,
},
want: "",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {