|
9 | 9 | "github.com/kong/kubernetes-ingress-controller/internal/ingress/controller/parser/util"
|
10 | 10 | configurationv1 "github.com/kong/kubernetes-ingress-controller/pkg/apis/configuration/v1"
|
11 | 11 | corev1 "k8s.io/api/core/v1"
|
12 |
| - networking "k8s.io/api/networking/v1beta1" |
13 | 12 | metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
14 | 13 | )
|
15 | 14 |
|
@@ -92,13 +91,11 @@ func Test_getPluginRelations(t *testing.T) {
|
92 | 91 | Route: kong.Route{
|
93 | 92 | Name: kong.String("foo-route"),
|
94 | 93 | },
|
95 |
| - Ingress: networking.Ingress{ |
96 |
| - ObjectMeta: metav1.ObjectMeta{ |
97 |
| - Name: "some-ingress", |
98 |
| - Namespace: "ns2", |
99 |
| - Annotations: map[string]string{ |
100 |
| - annotations.DeprecatedPluginsKey: "foo,bar", |
101 |
| - }, |
| 94 | + Ingress: util.K8sObjectInfo{ |
| 95 | + Name: "some-ingress", |
| 96 | + Namespace: "ns2", |
| 97 | + Annotations: map[string]string{ |
| 98 | + annotations.DeprecatedPluginsKey: "foo,bar", |
102 | 99 | },
|
103 | 100 | },
|
104 | 101 | },
|
@@ -126,27 +123,23 @@ func Test_getPluginRelations(t *testing.T) {
|
126 | 123 | Route: kong.Route{
|
127 | 124 | Name: kong.String("foo-route"),
|
128 | 125 | },
|
129 |
| - Ingress: networking.Ingress{ |
130 |
| - ObjectMeta: metav1.ObjectMeta{ |
131 |
| - Name: "some-ingress", |
132 |
| - Namespace: "ns2", |
133 |
| - Annotations: map[string]string{ |
134 |
| - annotations.DeprecatedPluginsKey: "foo,bar", |
135 |
| - }, |
| 126 | + Ingress: util.K8sObjectInfo{ |
| 127 | + Name: "some-ingress", |
| 128 | + Namespace: "ns2", |
| 129 | + Annotations: map[string]string{ |
| 130 | + annotations.DeprecatedPluginsKey: "foo,bar", |
136 | 131 | },
|
137 | 132 | },
|
138 | 133 | },
|
139 | 134 | {
|
140 | 135 | Route: kong.Route{
|
141 | 136 | Name: kong.String("bar-route"),
|
142 | 137 | },
|
143 |
| - Ingress: networking.Ingress{ |
144 |
| - ObjectMeta: metav1.ObjectMeta{ |
145 |
| - Name: "some-ingress", |
146 |
| - Namespace: "ns2", |
147 |
| - Annotations: map[string]string{ |
148 |
| - annotations.DeprecatedPluginsKey: "bar,baz", |
149 |
| - }, |
| 138 | + Ingress: util.K8sObjectInfo{ |
| 139 | + Name: "some-ingress", |
| 140 | + Namespace: "ns2", |
| 141 | + Annotations: map[string]string{ |
| 142 | + annotations.DeprecatedPluginsKey: "bar,baz", |
150 | 143 | },
|
151 | 144 | },
|
152 | 145 | },
|
@@ -224,27 +217,23 @@ func Test_getPluginRelations(t *testing.T) {
|
224 | 217 | Route: kong.Route{
|
225 | 218 | Name: kong.String("foo-route"),
|
226 | 219 | },
|
227 |
| - Ingress: networking.Ingress{ |
228 |
| - ObjectMeta: metav1.ObjectMeta{ |
229 |
| - Name: "some-ingress", |
230 |
| - Namespace: "ns2", |
231 |
| - Annotations: map[string]string{ |
232 |
| - annotations.DeprecatedPluginsKey: "foo,bar", |
233 |
| - }, |
| 220 | + Ingress: util.K8sObjectInfo{ |
| 221 | + Name: "some-ingress", |
| 222 | + Namespace: "ns2", |
| 223 | + Annotations: map[string]string{ |
| 224 | + annotations.DeprecatedPluginsKey: "foo,bar", |
234 | 225 | },
|
235 | 226 | },
|
236 | 227 | },
|
237 | 228 | {
|
238 | 229 | Route: kong.Route{
|
239 | 230 | Name: kong.String("bar-route"),
|
240 | 231 | },
|
241 |
| - Ingress: networking.Ingress{ |
242 |
| - ObjectMeta: metav1.ObjectMeta{ |
243 |
| - Name: "some-ingress", |
244 |
| - Namespace: "ns2", |
245 |
| - Annotations: map[string]string{ |
246 |
| - annotations.DeprecatedPluginsKey: "bar,baz", |
247 |
| - }, |
| 232 | + Ingress: util.K8sObjectInfo{ |
| 233 | + Name: "some-ingress", |
| 234 | + Namespace: "ns2", |
| 235 | + Annotations: map[string]string{ |
| 236 | + annotations.DeprecatedPluginsKey: "bar,baz", |
248 | 237 | },
|
249 | 238 | },
|
250 | 239 | },
|
|
0 commit comments