chore: 并入 iotlcm-upstream-proxy 历史到 upstream-proxy/(原提交 44209ec)
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package upstreamimpl
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"git.5iot.com/iotlcm-public/iotlcm-upstream-proxy/internal/model"
|
||||
"git.5iot.com/iotlcm-public/iotlcm-upstream-proxy/internal/model/entity"
|
||||
"git.5iot.com/iotlcm-public/iotlcm-upstream-proxy/internal/service"
|
||||
)
|
||||
|
||||
func TestApikaProxyTemplateRegistration(t *testing.T) {
|
||||
template, ok := service.UpstreamAPI().GetTemp("sim_onelink_kedang_v1")
|
||||
if !ok || template == nil {
|
||||
t.Fatal("apika proxy template not registered")
|
||||
}
|
||||
config := &model.SimChannelConfigItemCache{
|
||||
Template: &entity.TSimChannelTemplate{TempKey: "sim_onelink_kedang_v1"},
|
||||
Channel: &entity.TSimChannels{ChanKey: "apika-test"},
|
||||
}
|
||||
if instance := template.NewTemp(context.Background(), config); instance == nil {
|
||||
t.Fatal("apika proxy template failed to instantiate")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user