MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / setup

Function setup

rpc/xxx_test.go:223–243  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

221}
222
223func setup() {
224 rand.Seed(time.Now().UnixNano())
225
226 var err error
227 if tempDir, err = ioutil.TempDir("", "covenantsql"); err != nil {
228 panic(err)
229 }
230 if conf.GConf, err = conf.LoadConfig(confFile); err != nil {
231 panic(err)
232 }
233 if err = kms.InitLocalKeyPair(privateKey, []byte{}); err != nil {
234 panic(err)
235 }
236 route.InitKMS(filepath.Join(tempDir, "public.keystore"))
237 naconn.RegisterResolver(defaultResolver)
238 if node := thisNode(); node != nil {
239 defaultResolver.registerNode(node)
240 }
241
242 log.SetLevel(log.DebugLevel)
243}
244
245func teardown() {
246 if err := os.RemoveAll(tempDir); err != nil {

Callers 2

TestMainFunction · 0.70
run_benchmarkFunction · 0.50

Calls 7

LoadConfigFunction · 0.92
InitLocalKeyPairFunction · 0.92
InitKMSFunction · 0.92
RegisterResolverFunction · 0.92
SetLevelFunction · 0.92
thisNodeFunction · 0.70
registerNodeMethod · 0.45

Tested by

no test coverage detected