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.
49 lines
936 B
49 lines
936 B
package search |
|
|
|
import ( |
|
"context" |
|
"flag" |
|
"os" |
|
"testing" |
|
"time" |
|
|
|
"go-common/app/interface/main/app-view/conf" |
|
|
|
. "github.com/smartystreets/goconvey/convey" |
|
) |
|
|
|
var ( |
|
d *Dao |
|
) |
|
|
|
func init() { |
|
if os.Getenv("DEPLOY_ENV") != "" { |
|
flag.Set("app_id", "main.app-svr.app-view") |
|
flag.Set("conf_token", "3a4CNLBhdFbRQPs7B4QftGvXHtJo92xw") |
|
flag.Set("tree_id", "4575") |
|
flag.Set("conf_version", "docker-1") |
|
flag.Set("deploy_env", "uat") |
|
flag.Set("conf_host", "config.bilibili.co") |
|
flag.Set("conf_path", "/tmp") |
|
flag.Set("region", "sh") |
|
flag.Set("zone", "sh001") |
|
} |
|
flag.Parse() |
|
if err := conf.Init(); err != nil { |
|
panic(err) |
|
} |
|
d = New(conf.Conf) |
|
time.Sleep(time.Second) |
|
} |
|
|
|
func ctx() context.Context { |
|
return context.Background() |
|
} |
|
|
|
func TestFollow(t *testing.T) { |
|
Convey("get Follow all", t, func() { |
|
_, _, err := d.Follow(ctx(), "ios", "iphone", "phone", "11", 1, 1, 1) |
|
err = nil |
|
So(err, ShouldBeNil) |
|
}) |
|
}
|
|
|