Support for multiple HTTP verbs in routes/HTTPTrigger (#2064)
* Support for multiple HTTP verbs in routes/HTTPTrigger Signed-off-by: Sanket Sudake <sanketsudake@gmail.com> * Update pkg/apis/core/v1/types.go Co-authored-by: Harsh Thakur <harshthakur9030@gmail.com> * Fix fallbackurl for ingress Signed-off-by: Sanket Sudake <sanketsudake@gmail.com> Co-authored-by: Harsh Thakur <harshthakur9030@gmail.com>
This commit is contained in:
co-authored by
Harsh Thakur
parent
4038f0384b
commit
673ca25cf2
@@ -158,7 +158,7 @@ func TestHTTPTriggerApi(t *testing.T) {
|
||||
Namespace: testNS,
|
||||
},
|
||||
Spec: fv1.HTTPTriggerSpec{
|
||||
Method: http.MethodGet,
|
||||
Methods: []string{http.MethodGet},
|
||||
RelativeURL: "/hello",
|
||||
FunctionReference: fv1.FunctionReference{
|
||||
Type: fv1.FunctionReferenceTypeFunctionName,
|
||||
@@ -181,7 +181,7 @@ func TestHTTPTriggerApi(t *testing.T) {
|
||||
|
||||
tr, err := g.Client().V1().HTTPTrigger().Get(m)
|
||||
panicIf(err)
|
||||
assert(testTrigger.Spec.Method == tr.Spec.Method &&
|
||||
assert(len(testTrigger.Spec.Methods) == len(tr.Spec.Methods) &&
|
||||
testTrigger.Spec.RelativeURL == tr.Spec.RelativeURL &&
|
||||
testTrigger.Spec.FunctionReference.Type == tr.Spec.FunctionReference.Type &&
|
||||
testTrigger.Spec.FunctionReference.Name == tr.Spec.FunctionReference.Name, "trigger should match after reading")
|
||||
|
||||
Reference in New Issue
Block a user