add tests to ensure module id returns correctly

This commit is contained in:
Joel Wetzell
2026-02-09 18:17:42 -06:00
parent 86f1082159
commit dc19d18b81
15 changed files with 77 additions and 2 deletions

View File

@@ -14,6 +14,7 @@ func TestHTTPClientFromRegistry(t *testing.T) {
}
moduleInstance, err := registration.New(config.ModuleConfig{
Id: "test",
Type: "http.client",
})
@@ -21,6 +22,10 @@ func TestHTTPClientFromRegistry(t *testing.T) {
t.Fatalf("failed to create http.client module: %s", err)
}
if moduleInstance.Id() != "test" {
t.Fatalf("http.client module has wrong id: %s", moduleInstance.Id())
}
if moduleInstance.Type() != "http.client" {
t.Fatalf("http.client module has wrong type: %s", moduleInstance.Type())
}