@@ -112,7 +112,7 @@ func TestControl_GetHostInfoByVpnIp(t *testing.T) {
112
112
113
113
func TestListHostMapHostsIter (t * testing.T ) {
114
114
l := logrus .New ()
115
- hm := newHostMap (l , netip. Prefix {} )
115
+ hm := newHostMap (l )
116
116
hm .preferredRanges .Store (& []netip.Prefix {})
117
117
118
118
hosts := []struct {
@@ -134,7 +134,7 @@ func TestListHostMapHostsIter(t *testing.T) {
134
134
},
135
135
localIndexId : h .localIndexId ,
136
136
remoteIndexId : h .remoteIndexId ,
137
- vpnIp : h .vpnIp ,
137
+ vpnAddrs : []netip. Addr { h .vpnIp } ,
138
138
}, & Interface {})
139
139
}
140
140
@@ -147,7 +147,7 @@ func TestListHostMapHostsIter(t *testing.T) {
147
147
148
148
assert .Equal (t , len (hosts ), len (results ), "expected number of hosts in iterator" )
149
149
for i , h := range hosts {
150
- assert .Equal (t , h .vpnIp , results [i ].VpnIp )
150
+ assert .Equal (t , h .vpnIp , results [i ].VpnAddrs [ 0 ] )
151
151
assert .Equal (t , h .localIndexId , results [i ].LocalIndex )
152
152
assert .Equal (t , h .remoteIndexId , results [i ].RemoteIndex )
153
153
assert .Equal (t , h .remoteAddr , results [i ].CurrentRemote )
@@ -156,7 +156,7 @@ func TestListHostMapHostsIter(t *testing.T) {
156
156
157
157
func TestListHostMapIndexesIter (t * testing.T ) {
158
158
l := logrus .New ()
159
- hm := newHostMap (l , netip. Prefix {} )
159
+ hm := newHostMap (l )
160
160
hm .preferredRanges .Store (& []netip.Prefix {})
161
161
162
162
hosts := []struct {
@@ -178,7 +178,7 @@ func TestListHostMapIndexesIter(t *testing.T) {
178
178
},
179
179
localIndexId : h .localIndexId ,
180
180
remoteIndexId : h .remoteIndexId ,
181
- vpnIp : h .vpnIp ,
181
+ vpnAddrs : []netip. Addr { h .vpnIp } ,
182
182
}, & Interface {})
183
183
}
184
184
@@ -191,7 +191,7 @@ func TestListHostMapIndexesIter(t *testing.T) {
191
191
192
192
assert .Equal (t , len (hosts ), len (results ), "expected number of hosts in iterator" )
193
193
for i , h := range hosts {
194
- assert .Equal (t , h .vpnIp , results [i ].VpnIp )
194
+ assert .Equal (t , h .vpnIp , results [i ].VpnAddrs [ 0 ] )
195
195
assert .Equal (t , h .localIndexId , results [i ].LocalIndex )
196
196
assert .Equal (t , h .remoteIndexId , results [i ].RemoteIndex )
197
197
assert .Equal (t , h .remoteAddr , results [i ].CurrentRemote )
0 commit comments