github.com/ztalab/ZACA@v0.0.1/pkg/caclient/test/main_test.go (about) 1 package test 2 3 import ( 4 "github.com/ztalab/cfssl/hook" 5 "os" 6 "testing" 7 ) 8 9 func TestMain(m *testing.M) { 10 hook.ClientInsecureSkipVerify = true 11 os.Chdir("./../../../") 12 os.Setenv("IS_ENV", "test") 13 //cli.Start(func(i *core.I) error { 14 // // CA Start 15 // go func() { 16 // err := singleca.Server() 17 // if err != nil { 18 // i.Logger.Fatal(err) 19 // } 20 // }() 21 // return nil 22 //}, func(i *core.I) error { 23 // time.Sleep(2 * time.Second) 24 // if m.Run() > 0 { 25 // return errors.New("ERR") 26 // } 27 // 28 // os.Exit(0) 29 // return nil 30 //}) 31 }