用户接口远程调用
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.
 

35 lines
681 B

package user
import (
"testing"
)
func Test_GetUserByToken(t *testing.T) {
dbname := "dev_tetele_net"
token := "5536827c-36a5-4ec7-946d-49e4380c5103"
res, err := GetUserByToken(dbname, token, "111.229.34.252:7976")
t.Log(res)
t.Log(res["UserId"])
t.Log(err)
res, err = GetUserByUsername(dbname, "tetele")
t.Log(res)
t.Log(res["UserId"])
t.Log(err)
res, err = GetUserByUsercode(dbname, "2233")
t.Log(res)
t.Log(res["UserId"])
t.Log(err)
}
func Test_Login(t *testing.T) {
dbname := "dev_tetele_net"
account := "admin"
password := "e10adc3949ba59abbe56e057f20f883e"
res, err := Login(dbname, account, password)
t.Log(res)
t.Log(res["UserId"])
t.Log(err)
}