()
| 169 | } |
| 170 | |
| 171 | func setup() { |
| 172 | rand.Seed(time.Now().UnixNano()) |
| 173 | |
| 174 | var err error |
| 175 | if tempDir, err = ioutil.TempDir("", "covenantsql"); err != nil { |
| 176 | panic(err) |
| 177 | } |
| 178 | if conf.GConf, err = conf.LoadConfig(confFile); err != nil { |
| 179 | panic(err) |
| 180 | } |
| 181 | if err = kms.InitLocalKeyPair(privateKey, []byte{}); err != nil { |
| 182 | panic(err) |
| 183 | } |
| 184 | route.InitKMS(filepath.Join(tempDir, "public.keystore")) |
| 185 | } |
| 186 | |
| 187 | func teardown() { |
| 188 | if err := os.RemoveAll(tempDir); err != nil { |
no test coverage detected