allow two HTTP triggers with no URLs and different prefix (#2540)
* allow two HTTP triggers with no URL and different prefix * update dependency * Fix controller existing tests * Ensure namespace cleanup in API test * update test cases * handle error conditions in test Signed-off-by: Sanket Sudake <sanketsudake@gmail.com> Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
co-authored by
Sanket Sudake
parent
79b41ec070
commit
2882e0d3e7
@@ -134,7 +134,7 @@ func (a *API) checkHTTPTriggerDuplicates(ctx context.Context, t *fv1.HTTPTrigger
|
||||
continue
|
||||
}
|
||||
urlMatch := false
|
||||
if ht.Spec.RelativeURL == t.Spec.RelativeURL || (ht.Spec.Prefix != nil && t.Spec.Prefix != nil && *ht.Spec.Prefix != "" && *ht.Spec.Prefix == *t.Spec.Prefix) {
|
||||
if (ht.Spec.RelativeURL != "" && ht.Spec.RelativeURL == t.Spec.RelativeURL) || (ht.Spec.Prefix != nil && t.Spec.Prefix != nil && *ht.Spec.Prefix != "" && *ht.Spec.Prefix == *t.Spec.Prefix) {
|
||||
urlMatch = true
|
||||
}
|
||||
methodMatch := false
|
||||
|
||||
Reference in New Issue
Block a user