File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
internal/controller/state/dataplane Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -380,6 +380,25 @@ func TestConvertHTTPMirrorFilter(t *testing.T) {
380
380
},
381
381
name : "fraction result over 100" ,
382
382
},
383
+ {
384
+ filter : & v1.HTTPRequestMirrorFilter {
385
+ BackendRef : v1.BackendObjectReference {
386
+ Name : "backend" ,
387
+ Namespace : helpers.GetPointer [v1.Namespace ]("namespace" ),
388
+ },
389
+ Fraction : & v1.Fraction {
390
+ Numerator : 2 ,
391
+ Denominator : helpers .GetPointer (int32 (2 )),
392
+ },
393
+ },
394
+ expected : & HTTPRequestMirrorFilter {
395
+ Name : helpers .GetPointer ("backend" ),
396
+ Namespace : helpers .GetPointer ("namespace" ),
397
+ Target : helpers .GetPointer ("/_ngf-internal-mirror-namespace/backend-test/route1-0" ),
398
+ Percent : helpers .GetPointer (float64 (100 )),
399
+ },
400
+ name : "numerator equals denominator" ,
401
+ },
383
402
{
384
403
filter : & v1.HTTPRequestMirrorFilter {
385
404
BackendRef : v1.BackendObjectReference {
You can’t perform that action at this time.
0 commit comments