From 37a72d79a3505141067549d238421a9b78cbef84 Mon Sep 17 00:00:00 2001 From: "mayur.popli" Date: Fri, 11 Apr 2025 15:13:29 +0530 Subject: [PATCH] fix: context keys test case --- .../reqpreprocessor/cmd/plugin_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkg/plugin/implementation/reqpreprocessor/cmd/plugin_test.go b/pkg/plugin/implementation/reqpreprocessor/cmd/plugin_test.go index 20cc426..cb5c7e6 100644 --- a/pkg/plugin/implementation/reqpreprocessor/cmd/plugin_test.go +++ b/pkg/plugin/implementation/reqpreprocessor/cmd/plugin_test.go @@ -67,6 +67,20 @@ func TestProviderNew(t *testing.T) { req.Header.Set("transaction_id", "test-transaction") }, }, + { + name: "passing the contextKeys", + config: map[string]string{ + "role": "bpp", + "contextKeys": "transaction_id,message_id", + }, + expectedError: false, + expectedStatus: http.StatusOK, + prepareRequest: func(req *http.Request) { + req.Header.Set("context", "test-context") + req.Header.Set("transaction_id", "test-transaction") + req.Header.Set("bpp_id", "bpp1") + }, + }, } for _, tc := range testCases {