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:
@@ -16,6 +16,7 @@ func TestStringCreateFromRegistry(t *testing.T) {
|
||||
}
|
||||
|
||||
processorInstance, err := registration.New(config.ProcessorConfig{
|
||||
Id: "test-id",
|
||||
Type: "string.create",
|
||||
Params: map[string]any{
|
||||
"template": "{{.Payload}}",
|
||||
@@ -25,6 +26,10 @@ func TestStringCreateFromRegistry(t *testing.T) {
|
||||
t.Fatalf("failed to create string.create processor: %s", err)
|
||||
}
|
||||
|
||||
if processorInstance.Id() != "test-id" {
|
||||
t.Fatalf("string.create processor has wrong id: %s", processorInstance.Id())
|
||||
}
|
||||
|
||||
if processorInstance.Type() != "string.create" {
|
||||
t.Fatalf("string.create processor has wrong type: %s", processorInstance.Type())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user