From d2dd25df661eeec7f8ec774c6300fb241e0ccfa9 Mon Sep 17 00:00:00 2001 From: zhangchao Date: Mon, 7 Aug 2023 14:47:28 +0800 Subject: [PATCH] fix test Signed-off-by: zhangchao --- middleware/http/wasm/internal/e2e_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/middleware/http/wasm/internal/e2e_test.go b/middleware/http/wasm/internal/e2e_test.go index 3044d79e94..21c91ce34f 100644 --- a/middleware/http/wasm/internal/e2e_test.go +++ b/middleware/http/wasm/internal/e2e_test.go @@ -210,6 +210,11 @@ func Test_EndToEnd(t *testing.T) { defer ts.Close() meta := metadata.Base{Properties: map[string]string{"url": ts.URL + "/guest.wasm"}} + if len(tc.property) > 0 { + for k, v := range tc.property { + meta.Properties[k] = v + } + } handlerFn, err := wasm.NewMiddleware(l).GetHandler(context.Background(), middleware.Metadata{Base: meta}) require.NoError(t, err) handler := handlerFn(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {}))