Skip to content

Commit c691fd1

Browse files
authored
Remove unused package
1 parent 226b1d0 commit c691fd1

File tree

2 files changed

+70
-1
lines changed

2 files changed

+70
-1
lines changed

pkg/cloud/services/loadbalancer/loadbalancer.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ package loadbalancer
1919
import (
2020
"errors"
2121
"fmt"
22-
"reflect"
2322
"time"
2423

2524
"github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/listeners"

pkg/utils/strings/strings_test.go

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
/*
2+
Copyright 2024 The Kubernetes Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package strings
18+
19+
import (
20+
"testing"
21+
)
22+
23+
func TestCompareLists(t *testing.T) {
24+
tests := []struct {
25+
name string
26+
a []string
27+
b []string
28+
want bool
29+
}{
30+
{
31+
name: "Empty lists",
32+
a: []string{},
33+
b: []string{},
34+
want: true,
35+
},
36+
{
37+
name: "Equal lists",
38+
a: []string{"a", "b", "c"},
39+
b: []string{"a", "b", "c"},
40+
want: true,
41+
},
42+
{
43+
name: "Different order",
44+
a: []string{"a", "b", "c"},
45+
b: []string{"c", "b", "a"},
46+
want: true,
47+
},
48+
{
49+
name: "Different elements",
50+
a: []string{"a", "b", "c"},
51+
b: []string{"d", "e", "f"},
52+
want: false,
53+
},
54+
{
55+
name: "Different lengths",
56+
a: []string{"a", "b", "c"},
57+
b: []string{"a", "b"},
58+
want: false,
59+
},
60+
}
61+
62+
for _, tt := range tests {
63+
t.Run(tt.name, func(t *testing.T) {
64+
got := CompareLists(tt.a, tt.b)
65+
if got != tt.want {
66+
t.Errorf("CompareLists() = %v, want %v", got, tt.want)
67+
}
68+
})
69+
}
70+
}

0 commit comments

Comments
 (0)