Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for validateRouteDestinations (0.56 sec)

  1. pkg/config/validation/validation.go

    		errs = AppendValidation(errs, validateTLSMatch(match, context))
    	}
    	if len(tls.Route) == 0 {
    		errs = AppendValidation(errs, errors.New("TLS route is required"))
    	}
    	errs = AppendValidation(errs, validateRouteDestinations(tls.Route, gatewaySemantics))
    	return errs
    }
    
    func validateTLSMatch(match *networking.TLSMatchAttributes, context *networking.VirtualService) (errs Validation) {
    	if match == nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Jun 12 04:03:33 UTC 2024
    - 107.2K bytes
    - Viewed (0)
  2. pkg/config/validation/validation_test.go

    			Destination: &networking.Destination{Host: "foo.baz.east"},
    			Weight:      0,
    		}}, valid: false},
    	}
    
    	for _, tc := range testCases {
    		t.Run(tc.name, func(t *testing.T) {
    			if err := validateRouteDestinations(tc.routes, false); (err == nil) != tc.valid {
    				t.Fatalf("got valid=%v but wanted valid=%v: %v", err == nil, tc.valid, err)
    			}
    		})
    	}
    }
    
    // TODO: add TCP test cases once it is implemented
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 30 03:11:45 UTC 2024
    - 196K bytes
    - Viewed (0)
Back to top