Make production registration asset-free and verify direct deterministic execution
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
func TestRegisterAddsSeriatimFamily(t *testing.T) {
|
||||
registries := pipeline.Registries{Inputs: pipeline.NewInputAdapterRegistry()}
|
||||
if err := Register(registries, nil); err != nil {
|
||||
if err := Register(registries); err != nil {
|
||||
t.Fatalf("Register() error = %v, want nil", err)
|
||||
}
|
||||
assertContainsKeys(t, "inputs", registries.Inputs.RegisteredKeys(), []string{"seriatim"})
|
||||
@@ -32,7 +32,7 @@ func assertContainsKeys(t *testing.T, name string, got, want []string) {
|
||||
}
|
||||
|
||||
func TestRegisterRejectsNilInputRegistry(t *testing.T) {
|
||||
err := Register(pipeline.Registries{}, nil)
|
||||
err := Register(pipeline.Registries{})
|
||||
if err == nil || !strings.Contains(err.Error(), "input registry must not be nil") {
|
||||
t.Fatalf("Register() error = %v, want nil input registry error", err)
|
||||
}
|
||||
@@ -40,10 +40,10 @@ func TestRegisterRejectsNilInputRegistry(t *testing.T) {
|
||||
|
||||
func TestRegisterReportsDuplicateSeriatimRegistration(t *testing.T) {
|
||||
registries := pipeline.Registries{Inputs: pipeline.NewInputAdapterRegistry()}
|
||||
if err := Register(registries, nil); err != nil {
|
||||
if err := Register(registries); err != nil {
|
||||
t.Fatalf("first Register() error = %v, want nil", err)
|
||||
}
|
||||
err := Register(registries, nil)
|
||||
err := Register(registries)
|
||||
if err == nil || !strings.Contains(err.Error(), "register transcript input") || !strings.Contains(err.Error(), "already registered") {
|
||||
t.Fatalf("second Register() error = %v, want contextual duplicate error", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user