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.
27 lines
424 B
27 lines
424 B
package service |
|
|
|
import ( |
|
"flag" |
|
"testing" |
|
|
|
"go-common/app/job/main/spy/conf" |
|
"go-common/library/log" |
|
) |
|
|
|
func TestServiceReBuild(t *testing.T) { |
|
flag.Parse() |
|
if err := conf.Init(); err != nil { |
|
t.Errorf("conf.Init() error(%v)", err) |
|
t.FailNow() |
|
} |
|
log.Init(conf.Conf.Xlog) |
|
defer log.Close() |
|
if s == nil { |
|
s = New(conf.Conf) |
|
} |
|
testReBuild(t, s) |
|
} |
|
|
|
func testReBuild(t *testing.T, s *Service) { |
|
s.reBuild() |
|
}
|
|
|