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.
33 lines
600 B
33 lines
600 B
package dao |
|
|
|
import ( |
|
"context" |
|
"flag" |
|
"fmt" |
|
"go-common/app/interface/bbq/app-bbq/conf" |
|
"testing" |
|
) |
|
|
|
var ( |
|
d *Dao |
|
) |
|
|
|
func init() { |
|
flag.Set("conf", "../cmd/") |
|
flag.Set("conf_name", "test.toml") |
|
flag.Set("app_setting_name", "app_setting.toml") |
|
flag.Set("deploy.env", "uat") |
|
flag.Parse() |
|
if err := conf.Init(); err != nil { |
|
panic(err) |
|
} |
|
d = New(conf.Conf) |
|
} |
|
|
|
func TestUserLike(t *testing.T) { |
|
res, err := d.CheckUserLike(context.Background(), 88895104, []int64{74850, 2222}) |
|
fmt.Printf("res: %v", res) |
|
if err != nil && len(res) == 0 { |
|
t.Errorf("user like fail: err(%v)", err) |
|
} |
|
}
|
|
|