浏览代码

chore: update node-red test with MQTT messages

chore/proposed-structure
Blaz Smehov 4 周前
父节点
当前提交
dc0bb7c777
共有 3 个文件被更改,包括 174 次插入38 次删除
  1. +2
    -0
      cmd/decoder/main.go
  2. +0
    -2
      cmd/server/main.go
  3. +172
    -36
      test/node-red-integration-tests/apitest.json

+ 2
- 0
cmd/decoder/main.go 查看文件

@@ -146,6 +146,8 @@ func processIncoming(incoming model.Incoming_json, ctx *model.AppContext) {
}
}()

fmt.Println("message came")

incoming = mqttclient.IncomingBeaconFilter(incoming)
id := mqttclient.GetBeaconID(incoming)
now := time.Now().Unix()


+ 0
- 2
cmd/server/main.go 查看文件

@@ -50,8 +50,6 @@ func HttpServer(addr string) {
http.ListenAndServe(addr, handlers.CORS(originsOk, headersOk, methodsOk)(r))
}

// This looks wrong, should handle error somehow

func sendKafkaMessage(writer *kafka.Writer, value *model.ApiUpdate) bool {
valueStr, err := json.Marshal(&value)
if err != nil {


+ 172
- 36
test/node-red-integration-tests/apitest.json
文件差异内容过多而无法显示
查看文件


正在加载...
取消
保存