mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-08-31 18:59:00 +00:00
add id getter for processors
This commit is contained in:
@@ -15,6 +15,7 @@ func TestScriptExprFromRegistry(t *testing.T) {
|
||||
}
|
||||
|
||||
processorInstance, err := registration.New(config.ProcessorConfig{
|
||||
Id: "test-id",
|
||||
Type: "script.expr",
|
||||
Params: map[string]any{
|
||||
"expression": "foo + bar",
|
||||
@@ -24,6 +25,10 @@ func TestScriptExprFromRegistry(t *testing.T) {
|
||||
t.Fatalf("failed to create script.expr processor: %s", err)
|
||||
}
|
||||
|
||||
if processorInstance.Id() != "test-id" {
|
||||
t.Fatalf("script.expr processor has wrong id: %s", processorInstance.Id())
|
||||
}
|
||||
|
||||
if processorInstance.Type() != "script.expr" {
|
||||
t.Fatalf("script.expr processor has wrong type: %s", processorInstance.Type())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user