From 0e22016a26a974306153020a0e397c5de78f6f25 Mon Sep 17 00:00:00 2001 From: tanyamadaan Date: Thu, 20 Mar 2025 13:37:55 +0530 Subject: [PATCH] New test cases added --- pkg/plugin/implementation/router/router_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkg/plugin/implementation/router/router_test.go b/pkg/plugin/implementation/router/router_test.go index e858148..0593014 100644 --- a/pkg/plugin/implementation/router/router_test.go +++ b/pkg/plugin/implementation/router/router_test.go @@ -70,6 +70,11 @@ func TestNew(t *testing.T) { }, expectedError: "", }, + { + name: "Empty config", + config: nil, + expectedError: "config cannot be nil", + }, { name: "Empty routing config path", config: &Config{ @@ -77,6 +82,13 @@ func TestNew(t *testing.T) { }, expectedError: "routing_config path is empty", }, + { + name: "Routing config file does not exist", + config: &Config{ + RoutingConfig: "/nonexistent/path/to/rules.yaml", + }, + expectedError: "error reading config file", + }, } for _, tt := range tests {