@@ -16,6 +16,7 @@ import (
16
16
"github.com/solo-io/gloo/projects/gateway2/translator/testutils"
17
17
"github.com/solo-io/gloo/projects/gateway2/wellknown"
18
18
v1 "github.com/solo-io/gloo/projects/gloo/pkg/api/v1"
19
+ "github.com/solo-io/gloo/projects/gloo/pkg/api/v1/options/proxy_protocol"
19
20
corev1 "github.com/solo-io/skv2/pkg/api/core.skv2.solo.io/v1"
20
21
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
21
22
"sigs.k8s.io/controller-runtime/pkg/client"
@@ -48,12 +49,19 @@ var _ = Describe("ListenerOptions Plugin", func() {
48
49
},
49
50
}
50
51
51
- outputListener = & v1.Listener {}
52
+ outputListener = & v1.Listener {
53
+ Options : & v1.ListenerOptions {
54
+ ProxyProtocol : & proxy_protocol.ProxyProtocol {},
55
+ },
56
+ }
52
57
53
58
expectedOptions = & v1.ListenerOptions {
59
+ // from config
54
60
PerConnectionBufferLimitBytes : & wrapperspb.UInt32Value {
55
61
Value : uint32 (419 ),
56
62
},
63
+ // base
64
+ ProxyProtocol : & proxy_protocol.ProxyProtocol {},
57
65
}
58
66
})
59
67
JustBeforeEach (func () {
@@ -102,7 +110,7 @@ var _ = Describe("ListenerOptions Plugin", func() {
102
110
It ("does not add buffer limit" , func () {
103
111
err := plugin .ApplyListenerPlugin (ctx , listenerCtx , outputListener )
104
112
Expect (err ).ToNot (HaveOccurred ())
105
- Expect (outputListener .GetOptions ()).To (BeNil ())
113
+ Expect (outputListener .GetOptions (). GetPerConnectionBufferLimitBytes () ).To (BeNil ())
106
114
})
107
115
})
108
116
@@ -114,11 +122,10 @@ var _ = Describe("ListenerOptions Plugin", func() {
114
122
It ("does not add buffer limit" , func () {
115
123
err := plugin .ApplyListenerPlugin (ctx , listenerCtx , outputListener )
116
124
Expect (err ).ToNot (HaveOccurred ())
117
- Expect (outputListener .GetOptions ()).To (BeNil ())
125
+ Expect (outputListener .GetOptions (). GetPerConnectionBufferLimitBytes () ).To (BeNil ())
118
126
})
119
127
})
120
128
})
121
-
122
129
})
123
130
124
131
func attachedListenerOption () * solokubev1.ListenerOption {
@@ -144,6 +151,7 @@ func attachedListenerOption() *solokubev1.ListenerOption {
144
151
},
145
152
}
146
153
}
154
+
147
155
func attachedListenerOptionWithSectionName () * solokubev1.ListenerOption {
148
156
listOpt := attachedListenerOption ()
149
157
listOpt .Spec .TargetRefs [0 ].SectionName = & wrapperspb.StringValue {
0 commit comments