rpc
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
580 B

3 years ago
  1. package user
  2. import (
  3. "testing"
  4. )
  5. func Test_GetUserByToken(t *testing.T) {
  6. dbname := "dev_tetele_net"
  7. token := "5536827c-36a5-4ec7-946d-49e4380c5103"
  8. res, err := GetUserByToken(dbname, token, "111.229.34.252:7976")
  9. t.Log(res)
  10. t.Log(res["UserId"])
  11. t.Log(err)
  12. res, err = GetUserById(dbname, "114")
  13. t.Log(res)
  14. t.Log(res["UserId"])
  15. t.Log(err)
  16. }
  17. func Test_Login(t *testing.T) {
  18. dbname := "dev_tetele_net"
  19. account := "adminw"
  20. password := "e10adc3949ba59abbe56e057f20f883e"
  21. res, err := Login(dbname, account, password)
  22. t.Log(res)
  23. t.Log(res["UserId"])
  24. t.Log(err)
  25. }