@@ -17,7 +17,6 @@ limitations under the License.
17
17
package storage
18
18
19
19
import (
20
- "bytes"
21
20
"context"
22
21
"net"
23
22
"reflect"
@@ -1840,13 +1839,13 @@ func TestServiceRegistryResourceLocation(t *testing.T) {
1840
1839
}
1841
1840
1842
1841
// Test a non-existent name + port.
1843
- location , _ , err = redirector .ResourceLocation (ctx , "foo:q" )
1842
+ _ , _ , err = redirector .ResourceLocation (ctx , "foo:q" )
1844
1843
if err == nil {
1845
1844
t .Errorf ("Unexpected nil error" )
1846
1845
}
1847
1846
1848
1847
// Test a non-existent name + port (using second ip).
1849
- location , _ , err = redirector .ResourceLocation (ctx , "foo-second-ip:q" )
1848
+ _ , _ , err = redirector .ResourceLocation (ctx , "foo-second-ip:q" )
1850
1849
if err == nil {
1851
1850
t .Errorf ("Unexpected nil error" )
1852
1851
}
@@ -3171,22 +3170,22 @@ func TestAllocGetters(t *testing.T) {
3171
3170
3172
3171
alloc := storage .getAllocatorByClusterIP (tc .svc )
3173
3172
if tc .expectClusterIPPrimary {
3174
- if ! bytes .Equal (alloc .CIDR ().IP , storage .serviceIPs .CIDR ().IP ) {
3173
+ if ! net . IP .Equal (alloc .CIDR ().IP , storage .serviceIPs .CIDR ().IP ) {
3175
3174
t .Fatalf ("expected clusterIP primary allocator, but primary allocator was not selected" )
3176
3175
}
3177
3176
} else {
3178
- if ! bytes .Equal (alloc .CIDR ().IP , storage .secondaryServiceIPs .CIDR ().IP ) {
3177
+ if ! net . IP .Equal (alloc .CIDR ().IP , storage .secondaryServiceIPs .CIDR ().IP ) {
3179
3178
t .Errorf ("expected clusterIP secondary allocator, but secondary allocator was not selected" )
3180
3179
}
3181
3180
}
3182
3181
3183
3182
alloc = storage .getAllocatorBySpec (tc .svc )
3184
3183
if tc .expectSpecPrimary {
3185
- if ! bytes .Equal (alloc .CIDR ().IP , storage .serviceIPs .CIDR ().IP ) {
3184
+ if ! net . IP .Equal (alloc .CIDR ().IP , storage .serviceIPs .CIDR ().IP ) {
3186
3185
t .Errorf ("expected spec primary allocator, but primary allocator was not selected" )
3187
3186
}
3188
3187
} else {
3189
- if ! bytes .Equal (alloc .CIDR ().IP , storage .secondaryServiceIPs .CIDR ().IP ) {
3188
+ if ! net . IP .Equal (alloc .CIDR ().IP , storage .secondaryServiceIPs .CIDR ().IP ) {
3190
3189
t .Errorf ("expected spec secondary allocator, but secondary allocator was not selected" )
3191
3190
}
3192
3191
}
0 commit comments