mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-04-26 21:05:30 +00:00
add test for module with no id
This commit is contained in:
@@ -72,6 +72,23 @@ func TestNewRouter(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestNewRouterNoModuleId(t *testing.T) {
|
||||
routerConfig := config.Config{
|
||||
Modules: []config.ModuleConfig{
|
||||
{
|
||||
Id: "",
|
||||
Type: "mock.counter",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
_, moduleErrors, _ := showbridge.NewRouter(routerConfig)
|
||||
|
||||
if moduleErrors == nil {
|
||||
t.Fatalf("router should have returned 'unknown module' module errors")
|
||||
}
|
||||
}
|
||||
|
||||
func TestNewRouterUnknownModuleType(t *testing.T) {
|
||||
routerConfig := config.Config{
|
||||
Modules: []config.ModuleConfig{
|
||||
|
||||
Reference in New Issue
Block a user