gateway_test.go 502 B

12345678910111213141516171819202122232425
  1. package platform
  2. import (
  3. "testing"
  4. "github.com/ammeter/config"
  5. "github.com/yuguorong/go/log"
  6. )
  7. func TestGateway(T *testing.T) {
  8. //gw := InitGateway("")
  9. //gw.GetGatewayName()
  10. //gw.StartServer()
  11. }
  12. func TestPlatform(T *testing.T) {
  13. config.GetSysConfig().SetValue("Bus/DtuServer/Port", DEF_FTP_PORT)
  14. log.Info("process start...")
  15. p := PaPlatform{}
  16. p.SetGatewayUrl("/platform/dev/get-4G-gateway-list")
  17. p.SetModel("ammeter", REQ_AMMETER_URL)
  18. p.SetModel("SA10", REQ_AIR_URL)
  19. p.SaveModel()
  20. }