client_test.go 850 B

12345678910111213141516171819202122232425262728293031323334
  1. package client
  2. import (
  3. "metawant.greentech.com.cn/gaoyagang/gt-common/datacenter_client"
  4. "metawant.greentech.com.cn/gaoyagang/gt-common/httplib"
  5. "testing"
  6. )
  7. func TestCreateDcApiClient(t *testing.T) {
  8. v1 := CreateDcApiClient("47.96.12.136:8788", "simulations", "e3fc084fda3d2a6628b9ce28abf21243", httplib.HTTPSettings{})
  9. resp, err := v1.ObtainRangeMaxMin(&datacenter_client.RangeMaxMinReq{
  10. ProjectId: "92",
  11. ItemName: "C.M.CIP_QXB1_A@out",
  12. Stime: "2023-12-27 12:05:44",
  13. Etime: "2024-01-27 12:05:44",
  14. })
  15. t.Log(resp)
  16. t.Log(err)
  17. resp1, err1 := v1.FindWorkingUfByCycle(datacenter_client.FindWorkingUfByCycleReq{
  18. ProjectId: 92,
  19. DeviceCode: "UF-4001D",
  20. FilterCycle: 16,
  21. Step: 26,
  22. FilterTimeStart: 3046.00,
  23. FilterTimeEnd: 3546.00,
  24. Limit: 5,
  25. })
  26. t.Log(resp1)
  27. t.Log(err1)
  28. }