Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions docs/PLUGIN_DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ The returned value must implement `module.PipelineStep`:
```go
type PipelineStep interface {
Name() string
Execute(ctx context.Context, pc *PipelineContext) error
Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
}
```

Expand Down Expand Up @@ -349,6 +349,7 @@ This enables workflows to fail fast with actionable errors rather than cryptic r
package myplugin

import (
"log/slog"
"testing"

"github.com/CrisisTextLine/modular"
Expand All @@ -368,7 +369,9 @@ func TestPluginLoads(t *testing.T) {
func TestModuleCreation(t *testing.T) {
app := modular.NewStdApplication(modular.NewStdConfigProvider(nil), nil)
engine := workflow.NewStdEngine(app, slog.Default())
engine.LoadPlugin(New())
if err := engine.LoadPlugin(New()); err != nil {
t.Fatalf("LoadPlugin failed: %v", err)
}

cfg := &config.WorkflowConfig{
Modules: []config.ModuleConfig{
Expand Down