ipn: add ability to name profiles

Updates #713

Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
Maisem Ali
2022-11-18 14:42:32 +05:00
committed by Maisem Ali
parent 33520920c3
commit 575fd5f22b
5 changed files with 27 additions and 2 deletions
+11
View File
@@ -56,6 +56,7 @@ func TestPrefsEqual(t *testing.T) {
"NoSNAT",
"NetfilterMode",
"OperatorUser",
"ProfileName",
"Persist",
}
if have := fieldsOf(reflect.TypeOf(Prefs{})); !reflect.DeepEqual(have, prefsHandles) {
@@ -272,6 +273,16 @@ func TestPrefsEqual(t *testing.T) {
&Prefs{Persist: &persist.Persist{LoginName: "dave"}},
true,
},
{
&Prefs{ProfileName: "work"},
&Prefs{ProfileName: "work"},
true,
},
{
&Prefs{ProfileName: "work"},
&Prefs{ProfileName: "home"},
false,
},
}
for i, tt := range tests {
got := tt.a.Equals(tt.b)