@@ -8,11 +8,11 @@ import (
8
8
func TestValidateEndpoints (t * testing.T ) {
9
9
10
10
tests := []struct {
11
- name string
12
- endpoints []v1alpha2.Endpoint
11
+ name string
12
+ endpoints []v1alpha2.Endpoint
13
13
processedEndpointName map [string ]bool
14
14
processedEndpointPort map [int ]bool
15
- wantErr bool
15
+ wantErr bool
16
16
}{
17
17
{
18
18
name : "Case 1: Duplicate endpoint name within same component" ,
@@ -22,7 +22,7 @@ func TestValidateEndpoints(t *testing.T) {
22
22
},
23
23
processedEndpointName : map [string ]bool {},
24
24
processedEndpointPort : map [int ]bool {},
25
- wantErr : true ,
25
+ wantErr : true ,
26
26
},
27
27
{
28
28
name : "Case 2: Duplicate endpoint name across components" ,
@@ -33,7 +33,7 @@ func TestValidateEndpoints(t *testing.T) {
33
33
"url1" : true ,
34
34
},
35
35
processedEndpointPort : map [int ]bool {},
36
- wantErr : true ,
36
+ wantErr : true ,
37
37
},
38
38
{
39
39
name : "Case 3: Duplicate endpoint port within same component" ,
@@ -43,7 +43,7 @@ func TestValidateEndpoints(t *testing.T) {
43
43
},
44
44
processedEndpointName : map [string ]bool {},
45
45
processedEndpointPort : map [int ]bool {},
46
- wantErr : false ,
46
+ wantErr : false ,
47
47
},
48
48
{
49
49
name : "Case 4: Duplicate endpoint port across components" ,
@@ -64,9 +64,8 @@ func TestValidateEndpoints(t *testing.T) {
64
64
},
65
65
processedEndpointName : map [string ]bool {},
66
66
processedEndpointPort : map [int ]bool {},
67
- wantErr : true ,
67
+ wantErr : true ,
68
68
},
69
-
70
69
}
71
70
for _ , tt := range tests {
72
71
t .Run (tt .name , func (t * testing.T ) {
@@ -87,4 +86,4 @@ func generateDummyEndpoint(name string, port int) v1alpha2.Endpoint {
87
86
Name : name ,
88
87
TargetPort : port ,
89
88
}
90
- }
89
+ }
0 commit comments