消息处理模块重构

Signed-off-by: lixxxww <941403820@qq.com>
This commit is contained in:
lixxxww
2024-01-22 07:26:49 +00:00
committed by Gitee
parent 6a9e1b5587
commit 4502bf3ff4
5 changed files with 51 additions and 57 deletions

View File

@@ -2,20 +2,20 @@ package rule_engine
import (
"context"
"io/ioutil"
"os"
"pandax/pkg/rule_engine/message"
"pandax/pkg/rule_engine/nodes"
"testing"
)
func TestNewRuleChainInstance(t *testing.T) {
buf, err := ioutil.ReadFile("./manifest/manifest_sample.json")
buf, err := os.ReadFile("./manifest/manifest_sample.json")
if err != nil {
t.Error(err)
}
instance, errs := NewRuleChainInstance("11", buf)
if len(errs) > 0 {
t.Error(errs[0])
instance, err := NewRuleChainInstance("11", buf)
if err != nil {
t.Error(err)
}
metadata := message.Metadata{