|
|
|
@ -18,6 +18,7 @@ import (
|
|
|
|
|
"tailscale.com/health/healthmsg"
|
|
|
|
|
"tailscale.com/ipn"
|
|
|
|
|
"tailscale.com/ipn/ipnstate"
|
|
|
|
|
"tailscale.com/tailcfg"
|
|
|
|
|
"tailscale.com/tka"
|
|
|
|
|
"tailscale.com/tstest"
|
|
|
|
|
"tailscale.com/types/persist"
|
|
|
|
@ -834,7 +835,7 @@ func TestUpdatePrefs(t *testing.T) {
|
|
|
|
|
flags: []string{},
|
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
|
ControlURL: ipn.DefaultControlURL,
|
|
|
|
|
Persist: &persist.Persist{LoginName: "crawshaw.github"},
|
|
|
|
|
Persist: &persist.Persist{UserProfile: tailcfg.UserProfile{LoginName: "crawshaw.github"}},
|
|
|
|
|
},
|
|
|
|
|
env: upCheckEnv{
|
|
|
|
|
backendState: "Stopped",
|
|
|
|
@ -846,7 +847,7 @@ func TestUpdatePrefs(t *testing.T) {
|
|
|
|
|
flags: []string{},
|
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
|
ControlURL: ipn.DefaultControlURL,
|
|
|
|
|
Persist: &persist.Persist{LoginName: "crawshaw.github"},
|
|
|
|
|
Persist: &persist.Persist{UserProfile: tailcfg.UserProfile{LoginName: "crawshaw.github"}},
|
|
|
|
|
},
|
|
|
|
|
env: upCheckEnv{backendState: "Running"},
|
|
|
|
|
wantSimpleUp: true,
|
|
|
|
@ -857,7 +858,7 @@ func TestUpdatePrefs(t *testing.T) {
|
|
|
|
|
flags: []string{"--reset"},
|
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
|
ControlURL: ipn.DefaultControlURL,
|
|
|
|
|
Persist: &persist.Persist{LoginName: "crawshaw.github"},
|
|
|
|
|
Persist: &persist.Persist{UserProfile: tailcfg.UserProfile{LoginName: "crawshaw.github"}},
|
|
|
|
|
},
|
|
|
|
|
env: upCheckEnv{backendState: "Running"},
|
|
|
|
|
wantJustEditMP: &ipn.MaskedPrefs{
|
|
|
|
@ -884,7 +885,7 @@ func TestUpdatePrefs(t *testing.T) {
|
|
|
|
|
flags: []string{},
|
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
|
ControlURL: "https://login.tailscale.com",
|
|
|
|
|
Persist: &persist.Persist{LoginName: "crawshaw.github"},
|
|
|
|
|
Persist: &persist.Persist{UserProfile: tailcfg.UserProfile{LoginName: "crawshaw.github"}},
|
|
|
|
|
},
|
|
|
|
|
env: upCheckEnv{backendState: "Running"},
|
|
|
|
|
wantSimpleUp: true,
|
|
|
|
@ -895,7 +896,7 @@ func TestUpdatePrefs(t *testing.T) {
|
|
|
|
|
flags: []string{"--login-server=https://localhost:1000"},
|
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
|
ControlURL: "https://login.tailscale.com",
|
|
|
|
|
Persist: &persist.Persist{LoginName: "crawshaw.github"},
|
|
|
|
|
Persist: &persist.Persist{UserProfile: tailcfg.UserProfile{LoginName: "crawshaw.github"}},
|
|
|
|
|
AllowSingleHosts: true,
|
|
|
|
|
CorpDNS: true,
|
|
|
|
|
NetfilterMode: preftype.NetfilterOn,
|
|
|
|
@ -910,7 +911,7 @@ func TestUpdatePrefs(t *testing.T) {
|
|
|
|
|
flags: []string{"--advertise-tags=tag:foo"},
|
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
|
ControlURL: "https://login.tailscale.com",
|
|
|
|
|
Persist: &persist.Persist{LoginName: "crawshaw.github"},
|
|
|
|
|
Persist: &persist.Persist{UserProfile: tailcfg.UserProfile{LoginName: "crawshaw.github"}},
|
|
|
|
|
AllowSingleHosts: true,
|
|
|
|
|
CorpDNS: true,
|
|
|
|
|
NetfilterMode: preftype.NetfilterOn,
|
|
|
|
@ -944,7 +945,7 @@ func TestUpdatePrefs(t *testing.T) {
|
|
|
|
|
flags: []string{"--ssh"},
|
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
|
ControlURL: "https://login.tailscale.com",
|
|
|
|
|
Persist: &persist.Persist{LoginName: "crawshaw.github"},
|
|
|
|
|
Persist: &persist.Persist{UserProfile: tailcfg.UserProfile{LoginName: "crawshaw.github"}},
|
|
|
|
|
AllowSingleHosts: true,
|
|
|
|
|
CorpDNS: true,
|
|
|
|
|
NetfilterMode: preftype.NetfilterOn,
|
|
|
|
@ -965,7 +966,7 @@ func TestUpdatePrefs(t *testing.T) {
|
|
|
|
|
flags: []string{"--ssh=false"},
|
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
|
ControlURL: "https://login.tailscale.com",
|
|
|
|
|
Persist: &persist.Persist{LoginName: "crawshaw.github"},
|
|
|
|
|
Persist: &persist.Persist{UserProfile: tailcfg.UserProfile{LoginName: "crawshaw.github"}},
|
|
|
|
|
AllowSingleHosts: true,
|
|
|
|
|
CorpDNS: true,
|
|
|
|
|
RunSSH: true,
|
|
|
|
@ -990,7 +991,7 @@ func TestUpdatePrefs(t *testing.T) {
|
|
|
|
|
sshOverTailscale: true,
|
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
|
ControlURL: "https://login.tailscale.com",
|
|
|
|
|
Persist: &persist.Persist{LoginName: "crawshaw.github"},
|
|
|
|
|
Persist: &persist.Persist{UserProfile: tailcfg.UserProfile{LoginName: "crawshaw.github"}},
|
|
|
|
|
AllowSingleHosts: true,
|
|
|
|
|
CorpDNS: true,
|
|
|
|
|
NetfilterMode: preftype.NetfilterOn,
|
|
|
|
@ -1014,7 +1015,7 @@ func TestUpdatePrefs(t *testing.T) {
|
|
|
|
|
sshOverTailscale: true,
|
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
|
ControlURL: "https://login.tailscale.com",
|
|
|
|
|
Persist: &persist.Persist{LoginName: "crawshaw.github"},
|
|
|
|
|
Persist: &persist.Persist{UserProfile: tailcfg.UserProfile{LoginName: "crawshaw.github"}},
|
|
|
|
|
AllowSingleHosts: true,
|
|
|
|
|
CorpDNS: true,
|
|
|
|
|
NetfilterMode: preftype.NetfilterOn,
|
|
|
|
@ -1037,7 +1038,7 @@ func TestUpdatePrefs(t *testing.T) {
|
|
|
|
|
sshOverTailscale: true,
|
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
|
ControlURL: "https://login.tailscale.com",
|
|
|
|
|
Persist: &persist.Persist{LoginName: "crawshaw.github"},
|
|
|
|
|
Persist: &persist.Persist{UserProfile: tailcfg.UserProfile{LoginName: "crawshaw.github"}},
|
|
|
|
|
AllowSingleHosts: true,
|
|
|
|
|
CorpDNS: true,
|
|
|
|
|
NetfilterMode: preftype.NetfilterOn,
|
|
|
|
@ -1059,7 +1060,7 @@ func TestUpdatePrefs(t *testing.T) {
|
|
|
|
|
sshOverTailscale: true,
|
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
|
ControlURL: "https://login.tailscale.com",
|
|
|
|
|
Persist: &persist.Persist{LoginName: "crawshaw.github"},
|
|
|
|
|
Persist: &persist.Persist{UserProfile: tailcfg.UserProfile{LoginName: "crawshaw.github"}},
|
|
|
|
|
AllowSingleHosts: true,
|
|
|
|
|
CorpDNS: true,
|
|
|
|
|
RunSSH: true,
|
|
|
|
|