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