Add execution metadata to module specifications
This commit is contained in:
@@ -1,12 +1,25 @@
|
||||
package pipeline
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"gitea.maximumdirect.net/eric/notarius/internal/framework/contracts"
|
||||
)
|
||||
|
||||
func TestNormalizeModuleSpecDefaultsExecutionClass(t *testing.T) {
|
||||
normalized := normalizeModuleSpec(ModuleSpec{Key: " module ", Stage: StageChunk})
|
||||
if normalized.ExecutionClass != contracts.ExecutionClassDeterministic {
|
||||
t.Fatalf("ExecutionClass = %q, want deterministic compatibility default", normalized.ExecutionClass)
|
||||
}
|
||||
|
||||
cloned := cloneModuleSpec(normalized)
|
||||
if !reflect.DeepEqual(cloned, normalized) {
|
||||
t.Fatalf("cloneModuleSpec() = %#v, want %#v", cloned, normalized)
|
||||
}
|
||||
}
|
||||
|
||||
func TestValidateModuleSpecAllowsReferenceSlotsForEligibleStages(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
|
||||
Reference in New Issue
Block a user