New test cases added

This commit is contained in:
tanyamadaan
2025-03-20 13:37:55 +05:30
parent 8cd3c80ced
commit 0e22016a26

View File

@@ -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 {