add constructor for test module type

This commit is contained in:
Joel Wetzell
2026-05-19 21:55:43 -05:00
parent be1e01cc3f
commit 5db23627d6
3 changed files with 12 additions and 5 deletions
+3 -3
View File
@@ -19,7 +19,7 @@ func TestModuleBadRegistrationNoType(t *testing.T) {
module.RegisterModule(module.ModuleRegistration{
Type: "",
New: func(config config.ModuleConfig) (common.Module, error) {
return &test.TestModule{}, nil
return test.NewTestModule("test"), nil
},
})
}
@@ -47,14 +47,14 @@ func TestModuleBadRegistrationExistingType(t *testing.T) {
module.RegisterModule(module.ModuleRegistration{
Type: "module.test",
New: func(config config.ModuleConfig) (common.Module, error) {
return &test.TestModule{}, nil
return test.NewTestModule("test"), nil
},
})
module.RegisterModule(module.ModuleRegistration{
Type: "module.test",
New: func(config config.ModuleConfig) (common.Module, error) {
return &test.TestModule{}, nil
return test.NewTestModule("test"), nil
},
})
}