mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-08-20 05:28:58 +00:00
don't export module/processor/framer registrations
This commit is contained in:
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func TestArtnetPacketDecodeFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["artnet.packet.decode"]
|
||||
registration, ok := processor.GetProcessorRegistration("artnet.packet.decode")
|
||||
if !ok {
|
||||
t.Fatalf("artnet.packet.decode processor not registered")
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func TestArtnetPacketEncodeFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["artnet.packet.encode"]
|
||||
registration, ok := processor.GetProcessorRegistration("artnet.packet.encode")
|
||||
if !ok {
|
||||
t.Fatalf("artnet.packet.encode processor not registered")
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
)
|
||||
|
||||
func TestDbQueryFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["db.query"]
|
||||
registration, ok := processor.GetProcessorRegistration("db.query")
|
||||
if !ok {
|
||||
t.Fatalf("db.query processor not registered")
|
||||
}
|
||||
@@ -100,7 +100,7 @@ func TestGoodDbQuery(t *testing.T) {
|
||||
}
|
||||
for _, testCase := range testCases {
|
||||
t.Run(testCase.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["db.query"]
|
||||
registration, ok := processor.GetProcessorRegistration("db.query")
|
||||
if !ok {
|
||||
t.Fatalf("db.query processor not registered")
|
||||
}
|
||||
@@ -243,7 +243,7 @@ func TestBadDbQuery(t *testing.T) {
|
||||
errorString: "db.query unable to find module with id: test",
|
||||
},
|
||||
{
|
||||
name: "module not a DatabseModule",
|
||||
name: "module not a DatabaseModule",
|
||||
payload: test.TestStruct{Data: "hello"},
|
||||
params: map[string]any{
|
||||
"module": "test",
|
||||
@@ -259,7 +259,7 @@ func TestBadDbQuery(t *testing.T) {
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
|
||||
registration, ok := processor.ProcessorRegistry["db.query"]
|
||||
registration, ok := processor.GetProcessorRegistration("db.query")
|
||||
if !ok {
|
||||
t.Fatalf("db.query processor not registered")
|
||||
}
|
||||
@@ -293,7 +293,7 @@ func TestBadDbQuery(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkDbQuery(b *testing.B) {
|
||||
registration, ok := processor.ProcessorRegistry["db.query"]
|
||||
registration, ok := processor.GetProcessorRegistration("db.query")
|
||||
if !ok {
|
||||
b.Fatalf("db.query processor not registered")
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
func TestDebugLogFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["debug.log"]
|
||||
registration, ok := processor.GetProcessorRegistration("debug.log")
|
||||
if !ok {
|
||||
t.Fatalf("debug.log processor not registered")
|
||||
}
|
||||
@@ -52,7 +52,7 @@ func TestGoodDebugLog(t *testing.T) {
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
|
||||
registration, ok := processor.ProcessorRegistry["debug.log"]
|
||||
registration, ok := processor.GetProcessorRegistration("debug.log")
|
||||
if !ok {
|
||||
t.Fatalf("debug.log processor not registered")
|
||||
}
|
||||
@@ -89,7 +89,7 @@ func TestBadDebugLog(t *testing.T) {
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
|
||||
registration, ok := processor.ProcessorRegistry["debug.log"]
|
||||
registration, ok := processor.GetProcessorRegistration("debug.log")
|
||||
if !ok {
|
||||
t.Fatalf("debug.log processor not registered")
|
||||
}
|
||||
@@ -120,7 +120,7 @@ func TestBadDebugLog(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkDebugLog(b *testing.B) {
|
||||
registration, ok := processor.ProcessorRegistry["debug.log"]
|
||||
registration, ok := processor.GetProcessorRegistration("debug.log")
|
||||
if !ok {
|
||||
b.Fatalf("debug.log processor not registered")
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
func TestFilterChangeFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["filter.change"]
|
||||
registration, ok := processor.GetProcessorRegistration("filter.change")
|
||||
if !ok {
|
||||
t.Fatalf("filter.change processor not registered")
|
||||
}
|
||||
@@ -58,7 +58,7 @@ func TestGoodFilterChange(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["filter.change"]
|
||||
registration, ok := processor.GetProcessorRegistration("filter.change")
|
||||
if !ok {
|
||||
t.Fatalf("filter.change processor not registered")
|
||||
}
|
||||
@@ -95,7 +95,7 @@ func TestBadFilterChange(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["filter.change"]
|
||||
registration, ok := processor.GetProcessorRegistration("filter.change")
|
||||
if !ok {
|
||||
t.Fatalf("filter.change processor not registered")
|
||||
}
|
||||
@@ -126,7 +126,7 @@ func TestBadFilterChange(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkFilterChange(b *testing.B) {
|
||||
registration, ok := processor.ProcessorRegistry["filter.change"]
|
||||
registration, ok := processor.GetProcessorRegistration("filter.change")
|
||||
if !ok {
|
||||
b.Fatalf("filter.change processor not registered")
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
func TestFilterExprFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["filter.expr"]
|
||||
registration, ok := processor.GetProcessorRegistration("filter.expr")
|
||||
if !ok {
|
||||
t.Fatalf("filter.expr processor not registered")
|
||||
}
|
||||
@@ -71,7 +71,7 @@ func TestGoodFilterExpr(t *testing.T) {
|
||||
|
||||
for _, testCase := range testCases {
|
||||
t.Run(testCase.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["filter.expr"]
|
||||
registration, ok := processor.GetProcessorRegistration("filter.expr")
|
||||
if !ok {
|
||||
t.Fatalf("filter.expr processor not registered")
|
||||
}
|
||||
@@ -144,7 +144,7 @@ func TestBadFilterExpr(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["filter.expr"]
|
||||
registration, ok := processor.GetProcessorRegistration("filter.expr")
|
||||
if !ok {
|
||||
t.Fatalf("filter.expr processor not registered")
|
||||
}
|
||||
@@ -173,7 +173,7 @@ func TestBadFilterExpr(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkFilterExpr(b *testing.B) {
|
||||
registration, ok := processor.ProcessorRegistry["filter.expr"]
|
||||
registration, ok := processor.GetProcessorRegistration("filter.expr")
|
||||
if !ok {
|
||||
b.Fatalf("filter.expr processor not registered")
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
func TestFilterRateFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["filter.rate"]
|
||||
registration, ok := processor.GetProcessorRegistration("filter.rate")
|
||||
if !ok {
|
||||
t.Fatalf("filter.rate processor not registered")
|
||||
}
|
||||
@@ -40,7 +40,7 @@ func TestGoodFilterRate(t *testing.T) {
|
||||
|
||||
for _, testCase := range testCases {
|
||||
t.Run(testCase.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["filter.rate"]
|
||||
registration, ok := processor.GetProcessorRegistration("filter.rate")
|
||||
if !ok {
|
||||
t.Fatalf("filter.rate processor not registered")
|
||||
}
|
||||
@@ -87,7 +87,7 @@ func TestBadFilterRate(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["filter.rate"]
|
||||
registration, ok := processor.GetProcessorRegistration("filter.rate")
|
||||
if !ok {
|
||||
t.Fatalf("filter.rate processor not registered")
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
func TestFilterRegexFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["filter.regex"]
|
||||
registration, ok := processor.GetProcessorRegistration("filter.regex")
|
||||
if !ok {
|
||||
t.Fatalf("filter.regex processor not registered")
|
||||
}
|
||||
@@ -77,7 +77,7 @@ func TestGoodFilterRegex(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["filter.regex"]
|
||||
registration, ok := processor.GetProcessorRegistration("filter.regex")
|
||||
if !ok {
|
||||
t.Fatalf("filter.regex processor not registered")
|
||||
}
|
||||
@@ -145,7 +145,7 @@ func TestBadFilterRegex(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["filter.regex"]
|
||||
registration, ok := processor.GetProcessorRegistration("filter.regex")
|
||||
if !ok {
|
||||
t.Fatalf("filter.regex processor not registered")
|
||||
}
|
||||
@@ -176,7 +176,7 @@ func TestBadFilterRegex(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkFilterRegex(b *testing.B) {
|
||||
registration, ok := processor.ProcessorRegistry["filter.regex"]
|
||||
registration, ok := processor.GetProcessorRegistration("filter.regex")
|
||||
if !ok {
|
||||
b.Fatalf("filter.regex processor not registered")
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
func TestFloatParseFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["float.parse"]
|
||||
registration, ok := processor.GetProcessorRegistration("float.parse")
|
||||
if !ok {
|
||||
t.Fatalf("float.parse processor not registered")
|
||||
}
|
||||
@@ -63,7 +63,7 @@ func TestGoodFloatParse(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["float.parse"]
|
||||
registration, ok := processor.GetProcessorRegistration("float.parse")
|
||||
if !ok {
|
||||
t.Fatalf("float.parse processor not registered")
|
||||
}
|
||||
@@ -136,7 +136,7 @@ func TestBadFloatParse(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["float.parse"]
|
||||
registration, ok := processor.GetProcessorRegistration("float.parse")
|
||||
if !ok {
|
||||
t.Fatalf("float.parse processor not registered")
|
||||
}
|
||||
@@ -167,7 +167,7 @@ func TestBadFloatParse(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkFloatParse(b *testing.B) {
|
||||
registration, ok := processor.ProcessorRegistry["float.parse"]
|
||||
registration, ok := processor.GetProcessorRegistration("float.parse")
|
||||
if !ok {
|
||||
b.Fatalf("float.parse processor not registered")
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
func TestFloatRandomFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["float.random"]
|
||||
registration, ok := processor.GetProcessorRegistration("float.random")
|
||||
if !ok {
|
||||
t.Fatalf("float.random processor not registered")
|
||||
}
|
||||
@@ -57,7 +57,7 @@ func TestGoodFloatRandom(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["float.random"]
|
||||
registration, ok := processor.GetProcessorRegistration("float.random")
|
||||
if !ok {
|
||||
t.Fatalf("float.random processor not registered")
|
||||
}
|
||||
@@ -155,7 +155,7 @@ func TestBadFloatRandom(t *testing.T) {
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
|
||||
registration, ok := processor.ProcessorRegistry["float.random"]
|
||||
registration, ok := processor.GetProcessorRegistration("float.random")
|
||||
if !ok {
|
||||
t.Fatalf("float.random processor not registered")
|
||||
}
|
||||
@@ -186,7 +186,7 @@ func TestBadFloatRandom(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkFloatRandom(b *testing.B) {
|
||||
registration, ok := processor.ProcessorRegistry["float.random"]
|
||||
registration, ok := processor.GetProcessorRegistration("float.random")
|
||||
if !ok {
|
||||
b.Fatalf("float.random processor not registered")
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func TestFreeDCreateFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["freed.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("freed.create")
|
||||
if !ok {
|
||||
t.Fatalf("freed.create processor not registered")
|
||||
}
|
||||
@@ -89,7 +89,7 @@ func TestGoodFreeDCreate(t *testing.T) {
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
|
||||
registration, ok := processor.ProcessorRegistry["freed.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("freed.create")
|
||||
if !ok {
|
||||
t.Fatalf("freed.create processor not registered")
|
||||
}
|
||||
@@ -848,7 +848,7 @@ func TestBadFreeDCreate(t *testing.T) {
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
|
||||
registration, ok := processor.ProcessorRegistry["freed.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("freed.create")
|
||||
if !ok {
|
||||
t.Fatalf("freed.create processor not registered")
|
||||
}
|
||||
@@ -879,7 +879,7 @@ func TestBadFreeDCreate(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkFreeDCreate(b *testing.B) {
|
||||
registration, ok := processor.ProcessorRegistry["freed.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("freed.create")
|
||||
if !ok {
|
||||
b.Fatalf("freed.create processor not registered")
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func TestFreeDDecodeFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["freed.decode"]
|
||||
registration, ok := processor.GetProcessorRegistration("freed.decode")
|
||||
if !ok {
|
||||
t.Fatalf("freed.decode processor not registered")
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func TestFreeDEncodeFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["freed.encode"]
|
||||
registration, ok := processor.GetProcessorRegistration("freed.encode")
|
||||
if !ok {
|
||||
t.Fatalf("freed.encode processor not registered")
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
func TestHTTPRequestCreateFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["http.request.do"]
|
||||
registration, ok := processor.GetProcessorRegistration("http.request.do")
|
||||
if !ok {
|
||||
t.Fatalf("http.request.do processor not registered")
|
||||
}
|
||||
@@ -44,7 +44,7 @@ func TestGoodHTTPRequestDo(t *testing.T) {
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
|
||||
registration, ok := processor.ProcessorRegistry["http.request.do"]
|
||||
registration, ok := processor.GetProcessorRegistration("http.request.do")
|
||||
if !ok {
|
||||
t.Fatalf("http.request.do processor not registered")
|
||||
}
|
||||
@@ -132,7 +132,7 @@ func TestBadHTTPRequestDo(t *testing.T) {
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
|
||||
registration, ok := processor.ProcessorRegistry["http.request.do"]
|
||||
registration, ok := processor.GetProcessorRegistration("http.request.do")
|
||||
if !ok {
|
||||
t.Fatalf("http.request.do processor not registered")
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
func TestHTTPResponseCreateFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["http.response.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("http.response.create")
|
||||
if !ok {
|
||||
t.Fatalf("http.response.create processor not registered")
|
||||
}
|
||||
@@ -54,7 +54,7 @@ func TestGoodHTTPResponseCreate(t *testing.T) {
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
|
||||
registration, ok := processor.ProcessorRegistry["http.response.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("http.response.create")
|
||||
if !ok {
|
||||
t.Fatalf("http.response.create processor not registered")
|
||||
}
|
||||
@@ -128,7 +128,7 @@ func TestBadHTTPResponseCreate(t *testing.T) {
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
|
||||
registration, ok := processor.ProcessorRegistry["http.response.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("http.response.create")
|
||||
if !ok {
|
||||
t.Fatalf("http.response.create processor not registered")
|
||||
}
|
||||
@@ -159,7 +159,7 @@ func TestBadHTTPResponseCreate(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkHTTPResponseCreate(b *testing.B) {
|
||||
registration, ok := processor.ProcessorRegistry["http.response.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("http.response.create")
|
||||
if !ok {
|
||||
b.Fatalf("http.response.create processor not registered")
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
func TestIntParseFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["int.parse"]
|
||||
registration, ok := processor.GetProcessorRegistration("int.parse")
|
||||
if !ok {
|
||||
t.Fatalf("int.parse processor not registered")
|
||||
}
|
||||
@@ -84,7 +84,7 @@ func TestGoodIntParse(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["int.parse"]
|
||||
registration, ok := processor.GetProcessorRegistration("int.parse")
|
||||
if !ok {
|
||||
t.Fatalf("int.parse processor not registered")
|
||||
}
|
||||
@@ -170,7 +170,7 @@ func TestBadIntParse(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["int.parse"]
|
||||
registration, ok := processor.GetProcessorRegistration("int.parse")
|
||||
if !ok {
|
||||
t.Fatalf("int.parse processor not registered")
|
||||
}
|
||||
@@ -201,7 +201,7 @@ func TestBadIntParse(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkIntParse(b *testing.B) {
|
||||
registration, ok := processor.ProcessorRegistry["int.parse"]
|
||||
registration, ok := processor.GetProcessorRegistration("int.parse")
|
||||
if !ok {
|
||||
b.Fatalf("int.parse processor not registered")
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
func TestIntRandomFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["int.random"]
|
||||
registration, ok := processor.GetProcessorRegistration("int.random")
|
||||
if !ok {
|
||||
t.Fatalf("int.random processor not registered")
|
||||
}
|
||||
@@ -32,7 +32,7 @@ func TestIntRandomFromRegistry(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestIntRandomGoodConfig(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["int.random"]
|
||||
registration, ok := processor.GetProcessorRegistration("int.random")
|
||||
if !ok {
|
||||
t.Fatalf("int.random processor not registered")
|
||||
}
|
||||
@@ -84,7 +84,7 @@ func TestGoodIntRandom(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["int.random"]
|
||||
registration, ok := processor.GetProcessorRegistration("int.random")
|
||||
if !ok {
|
||||
t.Fatalf("int.random processor not registered")
|
||||
}
|
||||
@@ -166,7 +166,7 @@ func TestBadIntRandom(t *testing.T) {
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
|
||||
registration, ok := processor.ProcessorRegistry["int.random"]
|
||||
registration, ok := processor.GetProcessorRegistration("int.random")
|
||||
if !ok {
|
||||
t.Fatalf("int.random processor not registered")
|
||||
}
|
||||
@@ -197,7 +197,7 @@ func TestBadIntRandom(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkIntRandom(b *testing.B) {
|
||||
registration, ok := processor.ProcessorRegistry["int.random"]
|
||||
registration, ok := processor.GetProcessorRegistration("int.random")
|
||||
if !ok {
|
||||
b.Fatalf("int.random processor not registered")
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
func TestIntScaleFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["int.scale"]
|
||||
registration, ok := processor.GetProcessorRegistration("int.scale")
|
||||
if !ok {
|
||||
t.Fatalf("int.scale processor not registered")
|
||||
}
|
||||
@@ -55,7 +55,7 @@ func TestGoodIntScale(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["int.scale"]
|
||||
registration, ok := processor.GetProcessorRegistration("int.scale")
|
||||
if !ok {
|
||||
t.Fatalf("int.scale processor not registered")
|
||||
}
|
||||
@@ -140,7 +140,7 @@ func TestBadIntScale(t *testing.T) {
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
|
||||
registration, ok := processor.ProcessorRegistry["int.scale"]
|
||||
registration, ok := processor.GetProcessorRegistration("int.scale")
|
||||
if !ok {
|
||||
t.Fatalf("int.scale processor not registered")
|
||||
}
|
||||
@@ -171,7 +171,7 @@ func TestBadIntScale(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkIntScale(b *testing.B) {
|
||||
registration, ok := processor.ProcessorRegistry["int.scale"]
|
||||
registration, ok := processor.GetProcessorRegistration("int.scale")
|
||||
if !ok {
|
||||
b.Fatalf("int.scale processor not registered")
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func TestJsonDecodeFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["json.decode"]
|
||||
registration, ok := processor.GetProcessorRegistration("json.decode")
|
||||
if !ok {
|
||||
t.Fatalf("json.decode processor not registered")
|
||||
}
|
||||
@@ -127,7 +127,7 @@ func TestBadJsonDecode(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkJsonDecode(b *testing.B) {
|
||||
registration, ok := processor.ProcessorRegistry["json.decode"]
|
||||
registration, ok := processor.GetProcessorRegistration("json.decode")
|
||||
if !ok {
|
||||
b.Fatalf("json.decode processor not registered")
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
)
|
||||
|
||||
func TestJsonEncodeFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["json.encode"]
|
||||
registration, ok := processor.GetProcessorRegistration("json.encode")
|
||||
if !ok {
|
||||
t.Fatalf("json.encode processor not registered")
|
||||
}
|
||||
@@ -116,7 +116,7 @@ func TestBadJsonEncode(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkJsonEncode(b *testing.B) {
|
||||
registration, ok := processor.ProcessorRegistry["json.encode"]
|
||||
registration, ok := processor.GetProcessorRegistration("json.encode")
|
||||
if !ok {
|
||||
b.Fatalf("json.encode processor not registered")
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func TestKvGetFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["kv.get"]
|
||||
registration, ok := processor.GetProcessorRegistration("kv.get")
|
||||
if !ok {
|
||||
t.Fatalf("kv.get processor not registered")
|
||||
}
|
||||
@@ -75,7 +75,7 @@ func TestGoodKvGet(t *testing.T) {
|
||||
}
|
||||
for _, testCase := range testCases {
|
||||
t.Run(testCase.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["kv.get"]
|
||||
registration, ok := processor.GetProcessorRegistration("kv.get")
|
||||
if !ok {
|
||||
t.Fatalf("kv.get processor not registered")
|
||||
}
|
||||
@@ -198,7 +198,7 @@ func TestBadKvGet(t *testing.T) {
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
|
||||
registration, ok := processor.ProcessorRegistry["kv.get"]
|
||||
registration, ok := processor.GetProcessorRegistration("kv.get")
|
||||
if !ok {
|
||||
t.Fatalf("kv.get processor not registered")
|
||||
}
|
||||
@@ -229,7 +229,7 @@ func TestBadKvGet(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkKvGet(b *testing.B) {
|
||||
registration, ok := processor.ProcessorRegistry["kv.get"]
|
||||
registration, ok := processor.GetProcessorRegistration("kv.get")
|
||||
if !ok {
|
||||
b.Fatalf("kv.get processor not registered")
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func TestKvSetFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["kv.set"]
|
||||
registration, ok := processor.GetProcessorRegistration("kv.set")
|
||||
if !ok {
|
||||
t.Fatalf("kv.set processor not registered")
|
||||
}
|
||||
@@ -69,7 +69,7 @@ func TestGoodKvSet(t *testing.T) {
|
||||
}
|
||||
for _, testCase := range testCases {
|
||||
t.Run(testCase.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["kv.set"]
|
||||
registration, ok := processor.GetProcessorRegistration("kv.set")
|
||||
if !ok {
|
||||
t.Fatalf("kv.set processor not registered")
|
||||
}
|
||||
@@ -192,7 +192,7 @@ func TestBadKvSet(t *testing.T) {
|
||||
for _, testCase := range testCases {
|
||||
t.Run(testCase.name, func(t *testing.T) {
|
||||
|
||||
registration, ok := processor.ProcessorRegistry["kv.set"]
|
||||
registration, ok := processor.GetProcessorRegistration("kv.set")
|
||||
if !ok {
|
||||
t.Fatalf("kv.set processor not registered")
|
||||
}
|
||||
@@ -223,7 +223,7 @@ func TestBadKvSet(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkKvSet(b *testing.B) {
|
||||
registration, ok := processor.ProcessorRegistry["kv.set"]
|
||||
registration, ok := processor.GetProcessorRegistration("kv.set")
|
||||
if !ok {
|
||||
b.Fatalf("kv.set processor not registered")
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func TestMIDIControlChangeCreateFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["midi.control_change.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("midi.control_change.create")
|
||||
if !ok {
|
||||
t.Fatalf("midi.control_change.create processor not registered")
|
||||
}
|
||||
@@ -57,7 +57,7 @@ func TestGoodMIDIControlChangeCreate(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["midi.control_change.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("midi.control_change.create")
|
||||
if !ok {
|
||||
t.Fatalf("midi.control_change.create processor not registered")
|
||||
}
|
||||
@@ -130,7 +130,7 @@ func TestBadMIDIControlChangeCreate(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["midi.control_change.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("midi.control_change.create")
|
||||
if !ok {
|
||||
t.Fatalf("midi.control_change.create processor not registered")
|
||||
}
|
||||
@@ -161,7 +161,7 @@ func TestBadMIDIControlChangeCreate(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkMIDIControlChangeCreate(b *testing.B) {
|
||||
registration, ok := processor.ProcessorRegistry["midi.control_change.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("midi.control_change.create")
|
||||
if !ok {
|
||||
b.Fatalf("midi.control_change.create processor not registered")
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func TestMIDIMessageDecodeFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["midi.message.decode"]
|
||||
registration, ok := processor.GetProcessorRegistration("midi.message.decode")
|
||||
if !ok {
|
||||
t.Fatalf("midi.message.decode processor not registered")
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func TestMIDIMessageEncodeFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["midi.message.encode"]
|
||||
registration, ok := processor.GetProcessorRegistration("midi.message.encode")
|
||||
if !ok {
|
||||
t.Fatalf("midi.message.encode processor not registered")
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func TestMIDIMessageUnpackFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["midi.message.unpack"]
|
||||
registration, ok := processor.GetProcessorRegistration("midi.message.unpack")
|
||||
if !ok {
|
||||
t.Fatalf("midi.message.unpack processor not registered")
|
||||
}
|
||||
@@ -121,7 +121,7 @@ func TestBadMIDIMessageUnpack(t *testing.T) {
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
|
||||
registration, ok := processor.ProcessorRegistry["midi.message.unpack"]
|
||||
registration, ok := processor.GetProcessorRegistration("midi.message.unpack")
|
||||
if !ok {
|
||||
t.Fatalf("midi.message.unpack processor not registered")
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func TestMIDINoteOffCreteaFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["midi.note_off.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("midi.note_off.create")
|
||||
if !ok {
|
||||
t.Fatalf("midi.note_off.create processor not registered")
|
||||
}
|
||||
@@ -56,7 +56,7 @@ func TestGoodMIDINoteOffCretea(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["midi.note_off.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("midi.note_off.create")
|
||||
if !ok {
|
||||
t.Fatalf("midi.note_off.create processor not registered")
|
||||
}
|
||||
@@ -129,7 +129,7 @@ func TestBadMIDINoteOffCretea(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["midi.note_off.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("midi.note_off.create")
|
||||
if !ok {
|
||||
t.Fatalf("midi.note_off.create processor not registered")
|
||||
}
|
||||
@@ -160,7 +160,7 @@ func TestBadMIDINoteOffCretea(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkMIDINoteOffCreate(b *testing.B) {
|
||||
registration, ok := processor.ProcessorRegistry["midi.note_off.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("midi.note_off.create")
|
||||
if !ok {
|
||||
b.Fatalf("midi.note_off.create processor not registered")
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func TestMIDINoteOnCreateFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["midi.note_on.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("midi.note_on.create")
|
||||
if !ok {
|
||||
t.Fatalf("midi.note_on.create processor not registered")
|
||||
}
|
||||
@@ -56,7 +56,7 @@ func TestGoodMIDINoteOnCreate(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["midi.note_on.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("midi.note_on.create")
|
||||
if !ok {
|
||||
t.Fatalf("midi.note_on.create processor not registered")
|
||||
}
|
||||
@@ -126,7 +126,7 @@ func TestBadMIDINoteOnCreate(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["midi.note_on.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("midi.note_on.create")
|
||||
if !ok {
|
||||
t.Fatalf("midi.note_on.create processor not registered")
|
||||
}
|
||||
@@ -157,7 +157,7 @@ func TestBadMIDINoteOnCreate(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkMIDINoteOnCreate(b *testing.B) {
|
||||
registration, ok := processor.ProcessorRegistry["midi.note_on.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("midi.note_on.create")
|
||||
if !ok {
|
||||
b.Fatalf("midi.note_on.create processor not registered")
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func TestMIDIProgramChangeCreateFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["midi.program_change.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("midi.program_change.create")
|
||||
if !ok {
|
||||
t.Fatalf("midi.program_change.create processor not registered")
|
||||
}
|
||||
@@ -55,7 +55,7 @@ func TestGoodMIDIProgramChangeCreate(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["midi.program_change.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("midi.program_change.create")
|
||||
if !ok {
|
||||
t.Fatalf("midi.program_change.create processor not registered")
|
||||
}
|
||||
@@ -116,7 +116,7 @@ func TestBadMIDIProgramChangeCreate(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["midi.program_change.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("midi.program_change.create")
|
||||
if !ok {
|
||||
t.Fatalf("midi.program_change.create processor not registered")
|
||||
}
|
||||
@@ -147,7 +147,7 @@ func TestBadMIDIProgramChangeCreate(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkMIDIProgramChangeCreate(b *testing.B) {
|
||||
registration, ok := processor.ProcessorRegistry["midi.program_change.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("midi.program_change.create")
|
||||
if !ok {
|
||||
b.Fatalf("midi.program_change.create processor not registered")
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func TestModuleOutputFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["module.output"]
|
||||
registration, ok := processor.GetProcessorRegistration("module.output")
|
||||
if !ok {
|
||||
t.Fatalf("module.output processor not registered")
|
||||
}
|
||||
@@ -37,9 +37,9 @@ func TestModuleOutputFromRegistry(t *testing.T) {
|
||||
router := test.GetNewTestRouter()
|
||||
|
||||
got, err := processorInstance.Process(t.Context(), common.WrappedPayload{
|
||||
InputHandler: router.HandleInput,
|
||||
Modules: map[string]common.Module{"test": &test.TestOutputModule{}},
|
||||
Payload: payload,
|
||||
InputHandler: router.HandleInput,
|
||||
Modules: map[string]common.Module{"test": &test.TestOutputModule{}},
|
||||
Payload: payload,
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatalf("module.output processing failed: %s", err)
|
||||
@@ -62,7 +62,7 @@ func TestGoodModuleOutput(t *testing.T) {
|
||||
for _, testCase := range testCases {
|
||||
t.Run(testCase.name, func(t *testing.T) {
|
||||
|
||||
registration, ok := processor.ProcessorRegistry["module.output"]
|
||||
registration, ok := processor.GetProcessorRegistration("module.output")
|
||||
if !ok {
|
||||
t.Fatalf("module.output processor not registered")
|
||||
}
|
||||
@@ -126,7 +126,7 @@ func TestBadModuleOutput(t *testing.T) {
|
||||
for _, testCase := range testCases {
|
||||
t.Run(testCase.name, func(t *testing.T) {
|
||||
|
||||
registration, ok := processor.ProcessorRegistry["module.output"]
|
||||
registration, ok := processor.GetProcessorRegistration("module.output")
|
||||
if !ok {
|
||||
t.Fatalf("module.output processor not registered")
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func TestOSCMessageCreateFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["osc.message.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("osc.message.create")
|
||||
if !ok {
|
||||
t.Fatalf("osc.message.create processor not registered")
|
||||
}
|
||||
@@ -146,7 +146,7 @@ func TestGoodOSCMessageCreate(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["osc.message.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("osc.message.create")
|
||||
if !ok {
|
||||
t.Fatalf("osc.message.create processor not registered")
|
||||
}
|
||||
@@ -371,7 +371,7 @@ func TestBadOSCMessageCreate(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["osc.message.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("osc.message.create")
|
||||
if !ok {
|
||||
t.Fatalf("osc.message.create processor not registered")
|
||||
}
|
||||
@@ -402,7 +402,7 @@ func TestBadOSCMessageCreate(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkOSCMessageCreate(b *testing.B) {
|
||||
registration, ok := processor.ProcessorRegistry["osc.message.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("osc.message.create")
|
||||
if !ok {
|
||||
b.Fatalf("osc.message.create processor not registered")
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func TestOSCMessageDecodeFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["osc.message.decode"]
|
||||
registration, ok := processor.GetProcessorRegistration("osc.message.decode")
|
||||
if !ok {
|
||||
t.Fatalf("osc.message.decode processor not registered")
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func TestOSCMessageEncodeFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["osc.message.encode"]
|
||||
registration, ok := processor.GetProcessorRegistration("osc.message.encode")
|
||||
if !ok {
|
||||
t.Fatalf("osc.message.encode processor not registered")
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
)
|
||||
|
||||
func TestPubSubPublishFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["pubsub.publish"]
|
||||
registration, ok := processor.GetProcessorRegistration("pubsub.publish")
|
||||
if !ok {
|
||||
t.Fatalf("pubsub.publish processor not registered")
|
||||
}
|
||||
@@ -70,7 +70,7 @@ func TestGoodPubSubPublish(t *testing.T) {
|
||||
}
|
||||
for _, testCase := range testCases {
|
||||
t.Run(testCase.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["pubsub.publish"]
|
||||
registration, ok := processor.GetProcessorRegistration("pubsub.publish")
|
||||
if !ok {
|
||||
t.Fatalf("pubsub.publish processor not registered")
|
||||
}
|
||||
@@ -217,7 +217,7 @@ func TestBadPubSubPublish(t *testing.T) {
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
|
||||
registration, ok := processor.ProcessorRegistry["pubsub.publish"]
|
||||
registration, ok := processor.GetProcessorRegistration("pubsub.publish")
|
||||
if !ok {
|
||||
t.Fatalf("pubsub.publish processor not registered")
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func TestRouterInputFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["router.input"]
|
||||
registration, ok := processor.GetProcessorRegistration("router.input")
|
||||
if !ok {
|
||||
t.Fatalf("router.input processor not registered")
|
||||
}
|
||||
@@ -35,8 +35,8 @@ func TestRouterInputFromRegistry(t *testing.T) {
|
||||
expected := "test"
|
||||
|
||||
got, err := processorInstance.Process(t.Context(), common.WrappedPayload{
|
||||
InputHandler: test.GetNewTestRouter().HandleInput,
|
||||
Payload: payload,
|
||||
InputHandler: test.GetNewTestRouter().HandleInput,
|
||||
Payload: payload,
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatalf("router.input processing failed: %s", err)
|
||||
@@ -59,7 +59,7 @@ func TestGoodRouterInput(t *testing.T) {
|
||||
for _, testCase := range testCases {
|
||||
t.Run(testCase.name, func(t *testing.T) {
|
||||
|
||||
registration, ok := processor.ProcessorRegistry["router.input"]
|
||||
registration, ok := processor.GetProcessorRegistration("router.input")
|
||||
if !ok {
|
||||
t.Fatalf("router.input processor not registered")
|
||||
}
|
||||
@@ -95,36 +95,36 @@ func TestBadRouterInput(t *testing.T) {
|
||||
errorString string
|
||||
}{
|
||||
{
|
||||
name: "no source param",
|
||||
params: map[string]any{},
|
||||
payload: "test",
|
||||
inputHandler: router.HandleInput,
|
||||
errorString: "router.input source error: not found",
|
||||
name: "no source param",
|
||||
params: map[string]any{},
|
||||
payload: "test",
|
||||
inputHandler: router.HandleInput,
|
||||
errorString: "router.input source error: not found",
|
||||
},
|
||||
{
|
||||
name: "non-string source",
|
||||
params: map[string]any{
|
||||
"source": 123,
|
||||
},
|
||||
payload: "test",
|
||||
inputHandler: router.HandleInput,
|
||||
errorString: "router.input source error: not a string",
|
||||
payload: "test",
|
||||
inputHandler: router.HandleInput,
|
||||
errorString: "router.input source error: not a string",
|
||||
},
|
||||
{
|
||||
name: "router not found in context",
|
||||
params: map[string]any{
|
||||
"source": "test",
|
||||
},
|
||||
payload: "test",
|
||||
inputHandler: nil,
|
||||
errorString: "router.input no input handler found",
|
||||
payload: "test",
|
||||
inputHandler: nil,
|
||||
errorString: "router.input no input handler found",
|
||||
},
|
||||
}
|
||||
|
||||
for _, testCase := range testCases {
|
||||
t.Run(testCase.name, func(t *testing.T) {
|
||||
|
||||
registration, ok := processor.ProcessorRegistry["router.input"]
|
||||
registration, ok := processor.GetProcessorRegistration("router.input")
|
||||
if !ok {
|
||||
t.Fatalf("router.input processor not registered")
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
func TestScriptExprFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["script.expr"]
|
||||
registration, ok := processor.GetProcessorRegistration("script.expr")
|
||||
if !ok {
|
||||
t.Fatalf("script.expr processor not registered")
|
||||
}
|
||||
@@ -62,7 +62,7 @@ func TestGoodScriptExpr(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["script.expr"]
|
||||
registration, ok := processor.GetProcessorRegistration("script.expr")
|
||||
if !ok {
|
||||
t.Fatalf("script.expr processor not registered")
|
||||
}
|
||||
@@ -117,7 +117,7 @@ func TestBadScriptExpr(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["script.expr"]
|
||||
registration, ok := processor.GetProcessorRegistration("script.expr")
|
||||
if !ok {
|
||||
t.Fatalf("script.expr processor not registered")
|
||||
}
|
||||
@@ -148,7 +148,7 @@ func TestBadScriptExpr(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkScriptExpr(b *testing.B) {
|
||||
registration, ok := processor.ProcessorRegistry["script.expr"]
|
||||
registration, ok := processor.GetProcessorRegistration("script.expr")
|
||||
if !ok {
|
||||
b.Fatalf("script.expr processor not registered")
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
func TestScriptJSFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["script.js"]
|
||||
registration, ok := processor.GetProcessorRegistration("script.js")
|
||||
if !ok {
|
||||
t.Fatalf("script.js processor not registered")
|
||||
}
|
||||
@@ -45,7 +45,7 @@ func TestScriptJSFromRegistry(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestScriptJSNoProgram(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["script.js"]
|
||||
registration, ok := processor.GetProcessorRegistration("script.js")
|
||||
if !ok {
|
||||
t.Fatalf("script.js processor not registered")
|
||||
}
|
||||
@@ -61,7 +61,7 @@ func TestScriptJSNoProgram(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestScriptJSBadConfigWrongProgramType(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["script.js"]
|
||||
registration, ok := processor.GetProcessorRegistration("script.js")
|
||||
if !ok {
|
||||
t.Fatalf("script.js processor not registered")
|
||||
}
|
||||
@@ -151,7 +151,7 @@ func TestGoodScriptJS(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["script.js"]
|
||||
registration, ok := processor.GetProcessorRegistration("script.js")
|
||||
if !ok {
|
||||
t.Fatalf("script.js processor not registered")
|
||||
}
|
||||
@@ -199,7 +199,7 @@ func TestBadScriptJS(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["script.js"]
|
||||
registration, ok := processor.GetProcessorRegistration("script.js")
|
||||
if !ok {
|
||||
t.Fatalf("script.js processor not registered")
|
||||
}
|
||||
@@ -230,7 +230,7 @@ func TestBadScriptJS(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkScriptJS(b *testing.B) {
|
||||
registration, ok := processor.ProcessorRegistry["script.js"]
|
||||
registration, ok := processor.GetProcessorRegistration("script.js")
|
||||
if !ok {
|
||||
b.Fatalf("script.js processor not registered")
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func TestScriptWASMFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["script.wasm"]
|
||||
registration, ok := processor.GetProcessorRegistration("script.wasm")
|
||||
if !ok {
|
||||
t.Fatalf("script.wasm processor not registered")
|
||||
}
|
||||
@@ -60,7 +60,7 @@ func TestGoodScriptWASM(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["script.wasm"]
|
||||
registration, ok := processor.GetProcessorRegistration("script.wasm")
|
||||
if !ok {
|
||||
t.Fatalf("script.wasm processor not registered")
|
||||
}
|
||||
@@ -160,7 +160,7 @@ func TestBadScriptWASM(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["script.wasm"]
|
||||
registration, ok := processor.GetProcessorRegistration("script.wasm")
|
||||
if !ok {
|
||||
t.Fatalf("script.wasm processor not registered")
|
||||
}
|
||||
@@ -191,7 +191,7 @@ func TestBadScriptWASM(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkScriptWASM(b *testing.B) {
|
||||
registration, ok := processor.ProcessorRegistry["script.wasm"]
|
||||
registration, ok := processor.GetProcessorRegistration("script.wasm")
|
||||
if !ok {
|
||||
b.Fatalf("script.wasm processor not registered")
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
func TestSipResponseAudioCreateFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["sip.response.audio.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("sip.response.audio.create")
|
||||
if !ok {
|
||||
t.Fatalf("sip.response.audio.create processor not registered")
|
||||
}
|
||||
@@ -76,7 +76,7 @@ func TestGoodSipResponseAudioCreate(t *testing.T) {
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
|
||||
registration, ok := processor.ProcessorRegistry["sip.response.audio.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("sip.response.audio.create")
|
||||
if !ok {
|
||||
t.Fatalf("sip.response.audio.create processor not registered")
|
||||
}
|
||||
@@ -183,7 +183,7 @@ func TestBadSipResponseAudioCreate(t *testing.T) {
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
|
||||
registration, ok := processor.ProcessorRegistry["sip.response.audio.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("sip.response.audio.create")
|
||||
if !ok {
|
||||
t.Fatalf("sip.response.audio.create processor not registered")
|
||||
}
|
||||
@@ -214,7 +214,7 @@ func TestBadSipResponseAudioCreate(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkSipResponseAudioCreate(b *testing.B) {
|
||||
registration, ok := processor.ProcessorRegistry["sip.response.audio.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("sip.response.audio.create")
|
||||
if !ok {
|
||||
b.Fatalf("sip.response.audio.create processor not registered")
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
func TestSipResponseDTMFCreateFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["sip.response.dtmf.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("sip.response.dtmf.create")
|
||||
if !ok {
|
||||
t.Fatalf("sip.response.dtmf.create processor not registered")
|
||||
}
|
||||
@@ -74,7 +74,7 @@ func TestGoodSipResponseDTMFCreate(t *testing.T) {
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
|
||||
registration, ok := processor.ProcessorRegistry["sip.response.dtmf.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("sip.response.dtmf.create")
|
||||
if !ok {
|
||||
t.Fatalf("sip.response.dtmf.create processor not registered")
|
||||
}
|
||||
@@ -191,7 +191,7 @@ func TestBadSipResponseDTMFCreate(t *testing.T) {
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
|
||||
registration, ok := processor.ProcessorRegistry["sip.response.dtmf.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("sip.response.dtmf.create")
|
||||
if !ok {
|
||||
t.Fatalf("sip.response.dtmf.create processor not registered")
|
||||
}
|
||||
@@ -222,7 +222,7 @@ func TestBadSipResponseDTMFCreate(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkSipResponseDTMFCreate(b *testing.B) {
|
||||
registration, ok := processor.ProcessorRegistry["sip.response.dtmf.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("sip.response.dtmf.create")
|
||||
if !ok {
|
||||
b.Fatalf("sip.response.dtmf.create processor not registered")
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
func TestStringCreateFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["string.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("string.create")
|
||||
if !ok {
|
||||
t.Fatalf("string.create processor not registered")
|
||||
}
|
||||
@@ -84,7 +84,7 @@ func TestGoodStringCreate(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["string.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("string.create")
|
||||
if !ok {
|
||||
t.Fatalf("string.create processor not registered")
|
||||
}
|
||||
@@ -157,7 +157,7 @@ func TestBadStringCreate(t *testing.T) {
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
|
||||
registration, ok := processor.ProcessorRegistry["string.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("string.create")
|
||||
if !ok {
|
||||
t.Fatalf("string.create processor not registered")
|
||||
}
|
||||
@@ -188,7 +188,7 @@ func TestBadStringCreate(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkStringCreate(b *testing.B) {
|
||||
registration, ok := processor.ProcessorRegistry["string.create"]
|
||||
registration, ok := processor.GetProcessorRegistration("string.create")
|
||||
if !ok {
|
||||
b.Fatalf("string.create processor not registered")
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
func TestStringDecodeFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["string.decode"]
|
||||
registration, ok := processor.GetProcessorRegistration("string.decode")
|
||||
if !ok {
|
||||
t.Fatalf("string.decode processor not registered")
|
||||
}
|
||||
@@ -101,7 +101,7 @@ func TestBadStringDecode(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkStringDecode(b *testing.B) {
|
||||
registration, ok := processor.ProcessorRegistry["string.decode"]
|
||||
registration, ok := processor.GetProcessorRegistration("string.decode")
|
||||
if !ok {
|
||||
b.Fatalf("string.decode processor not registered")
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func TestStringEncodeFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["string.encode"]
|
||||
registration, ok := processor.GetProcessorRegistration("string.encode")
|
||||
if !ok {
|
||||
t.Fatalf("string.encode processor not registered")
|
||||
}
|
||||
@@ -107,7 +107,7 @@ func TestBadStringEncode(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkStringEncode(b *testing.B) {
|
||||
registration, ok := processor.ProcessorRegistry["string.encode"]
|
||||
registration, ok := processor.GetProcessorRegistration("string.encode")
|
||||
if !ok {
|
||||
b.Fatalf("string.encode processor not registered")
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func TestStringSplitFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["string.split"]
|
||||
registration, ok := processor.GetProcessorRegistration("string.split")
|
||||
if !ok {
|
||||
t.Fatalf("string.split processor not registered")
|
||||
}
|
||||
@@ -66,7 +66,7 @@ func TestGoodStringSplit(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["string.split"]
|
||||
registration, ok := processor.GetProcessorRegistration("string.split")
|
||||
if !ok {
|
||||
t.Fatalf("string.split processor not registered")
|
||||
}
|
||||
@@ -126,7 +126,7 @@ func TestBadStringSplit(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["string.split"]
|
||||
registration, ok := processor.GetProcessorRegistration("string.split")
|
||||
if !ok {
|
||||
t.Fatalf("string.split processor not registered")
|
||||
}
|
||||
@@ -156,7 +156,7 @@ func TestBadStringSplit(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkStringSplit(b *testing.B) {
|
||||
registration, ok := processor.ProcessorRegistry["string.split"]
|
||||
registration, ok := processor.GetProcessorRegistration("string.split")
|
||||
if !ok {
|
||||
b.Fatalf("string.split processor not registered")
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func TestStructFieldGetFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["struct.field.get"]
|
||||
registration, ok := processor.GetProcessorRegistration("struct.field.get")
|
||||
if !ok {
|
||||
t.Fatalf("struct.field.get processor not registered")
|
||||
}
|
||||
@@ -93,7 +93,7 @@ func TestGoodStructFieldGet(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["struct.field.get"]
|
||||
registration, ok := processor.GetProcessorRegistration("struct.field.get")
|
||||
if !ok {
|
||||
t.Fatalf("struct.field.get processor not registered")
|
||||
}
|
||||
@@ -162,7 +162,7 @@ func TestBadStructFieldGet(t *testing.T) {
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
|
||||
registration, ok := processor.ProcessorRegistry["struct.field.get"]
|
||||
registration, ok := processor.GetProcessorRegistration("struct.field.get")
|
||||
if !ok {
|
||||
t.Fatalf("struct.field.get processor not registered")
|
||||
}
|
||||
@@ -193,7 +193,7 @@ func TestBadStructFieldGet(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkStructFieldGet(b *testing.B) {
|
||||
registration, ok := processor.ProcessorRegistry["struct.field.get"]
|
||||
registration, ok := processor.GetProcessorRegistration("struct.field.get")
|
||||
if !ok {
|
||||
b.Fatalf("struct.field.get processor not registered")
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func TestStructMethodGetFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["struct.method.get"]
|
||||
registration, ok := processor.GetProcessorRegistration("struct.method.get")
|
||||
if !ok {
|
||||
t.Fatalf("struct.method.get processor not registered")
|
||||
}
|
||||
@@ -118,7 +118,7 @@ func TestGoodStructMethodGet(t *testing.T) {
|
||||
}
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["struct.method.get"]
|
||||
registration, ok := processor.GetProcessorRegistration("struct.method.get")
|
||||
if !ok {
|
||||
t.Fatalf("struct.method.get processor not registered")
|
||||
}
|
||||
@@ -187,7 +187,7 @@ func TestBadStructMethodGet(t *testing.T) {
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
|
||||
registration, ok := processor.ProcessorRegistry["struct.method.get"]
|
||||
registration, ok := processor.GetProcessorRegistration("struct.method.get")
|
||||
if !ok {
|
||||
t.Fatalf("struct.method.get processor not registered")
|
||||
}
|
||||
@@ -218,7 +218,7 @@ func TestBadStructMethodGet(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkStructMethodGet(b *testing.B) {
|
||||
registration, ok := processor.ProcessorRegistry["struct.method.get"]
|
||||
registration, ok := processor.GetProcessorRegistration("struct.method.get")
|
||||
if !ok {
|
||||
b.Fatalf("struct.method.get processor not registered")
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
func TestTimeSleepFromRegistry(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["time.sleep"]
|
||||
registration, ok := processor.GetProcessorRegistration("time.sleep")
|
||||
if !ok {
|
||||
t.Fatalf("time.sleep processor not registered")
|
||||
}
|
||||
@@ -45,7 +45,7 @@ func TestGoodTimeSleep(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["time.sleep"]
|
||||
registration, ok := processor.GetProcessorRegistration("time.sleep")
|
||||
if !ok {
|
||||
t.Fatalf("time.sleep processor not registered")
|
||||
}
|
||||
@@ -97,7 +97,7 @@ func TestBadTimeSleep(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
registration, ok := processor.ProcessorRegistry["time.sleep"]
|
||||
registration, ok := processor.GetProcessorRegistration("time.sleep")
|
||||
if !ok {
|
||||
t.Fatalf("time.sleep processor not registered")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user