ipn: remove the last traces of Prefs.AllowSingleHosts
We stopped reading this field nearly two years ago, with a TODO comment to remove it sometime in 2025. It is now 2026. Updates #12058 Change-Id: I8ddf1c2e4c3c428e8d45a6491d3899368ec52c30 Signed-off-by: Alex Chan <alexc@tailscale.com>
This commit is contained in:
+1
-23
@@ -70,7 +70,6 @@ func TestPrefsEqual(t *testing.T) {
|
||||
"DriveShares",
|
||||
"RelayServerPort",
|
||||
"RelayServerStaticEndpoints",
|
||||
"AllowSingleHosts",
|
||||
"Persist",
|
||||
}
|
||||
if have := fieldsOf(reflect.TypeFor[Prefs]()); !reflect.DeepEqual(have, prefsHandles) {
|
||||
@@ -714,7 +713,7 @@ func TestMaskedPrefsFields(t *testing.T) {
|
||||
have := map[string]bool{}
|
||||
for _, f := range fieldsOf(reflect.TypeFor[Prefs]()) {
|
||||
switch f {
|
||||
case "Persist", "AllowSingleHosts":
|
||||
case "Persist":
|
||||
// These can't be edited.
|
||||
continue
|
||||
}
|
||||
@@ -1222,27 +1221,6 @@ func TestNotifyPrefsJSONRoundtrip(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// Verify that our Prefs type writes out an AllowSingleHosts field so we can
|
||||
// downgrade to older versions that require it.
|
||||
func TestPrefsDowngrade(t *testing.T) {
|
||||
var p Prefs
|
||||
j, err := json.Marshal(p)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
type oldPrefs struct {
|
||||
AllowSingleHosts bool
|
||||
}
|
||||
var op oldPrefs
|
||||
if err := json.Unmarshal(j, &op); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if !op.AllowSingleHosts {
|
||||
t.Fatal("AllowSingleHosts should be true")
|
||||
}
|
||||
}
|
||||
|
||||
func TestParseAutoExitNodeString(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
|
||||
Reference in New Issue
Block a user