chore: 并入 iotlcm-upstream-proxy 历史到 upstream-proxy/(原提交 44209ec)

This commit is contained in:
MiFaZhan
2026-11-02 13:28:02 +08:00
117 changed files with 8690 additions and 0 deletions
@@ -0,0 +1,33 @@
package upstreamimpl_test
import (
"context"
"testing"
_ "git.5iot.com/iotlcm-public/iotlcm-upstream-proxy/internal/logic"
"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 TestMobilePublicProxyTemplateRegistration(t *testing.T) {
for _, templateKey := range []string{
"sim_onelink_daliuliang_v1",
"sim__daliuliang_v1",
"sim_onelink_mobile_public_v1",
} {
t.Run(templateKey, func(t *testing.T) {
template, ok := service.UpstreamAPI().GetTemp(templateKey)
if !ok || template == nil {
t.Fatal("mobile public proxy template not registered")
}
config := &model.SimChannelConfigItemCache{
Template: &entity.TSimChannelTemplate{TempKey: templateKey},
Channel: &entity.TSimChannels{ChanKey: "daliuliang-test"},
}
if instance := template.NewTemp(context.Background(), config); instance == nil {
t.Fatal("mobile public proxy failed to instantiate")
}
})
}
}