GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Recycle keystore file in unit test · CovenantSQL/CovenantSQL@eea91b5

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • client
    • helper_test.go
  • cmd
    • cql-minerd
      • node.go
    • cqld
      • bench_test.go
  • consistent
    • consistent_test.go
    • load_test.go
  • crypto/kms
    • pubkeystore_test.go
  • metric
    • rpc_test.go
  • route
    • acl_test.go
    • service_test.go
  • rpc
    • client_test.go
    • leak_test.go
    • rpcutil_test.go
    • server_test.go
  • twopc
    • twopc_test.go
  • utils
    • remove.go
    • remove_test.go
  • worker
    • chainbusservice_test.go
    • helper_test.go
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎client/helper_test.go‎

Copy file name to clipboardExpand all lines: client/helper_test.go
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,9 @@ func initNode() (cleanupFunc func(), tempDir string, server *rpc.Server, err err
201201
// init conf
202202
_, testFile, _, _ := runtime.Caller(0)
203203
pubKeyStoreFile := filepath.Join(tempDir, PubKeyStorePath+"_dht")
204-
os.Remove(pubKeyStoreFile)
204+
utils.RemoveAll(pubKeyStoreFile + "*")
205205
clientPubKeyStoreFile := filepath.Join(tempDir, PubKeyStorePath+"_c")
206-
os.Remove(clientPubKeyStoreFile)
206+
utils.RemoveAll(clientPubKeyStoreFile + "*")
207207
dupConfFile := filepath.Join(tempDir, "config.yaml")
208208
confFile := filepath.Join(filepath.Dir(testFile), "../test/node_standalone/config.yaml")
209209
if err = utils.DupConf(confFile, dupConfFile); err != nil {
Collapse file

‎cmd/cql-minerd/node.go‎

Copy file name to clipboardExpand all lines: cmd/cql-minerd/node.go
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ package main
1818

1919
import (
2020
"fmt"
21-
"os"
2221
"syscall"
2322
"time"
2423

@@ -28,6 +27,7 @@ import (
2827
"github.com/CovenantSQL/CovenantSQL/crypto/kms"
2928
"github.com/CovenantSQL/CovenantSQL/route"
3029
"github.com/CovenantSQL/CovenantSQL/rpc"
30+
"github.com/CovenantSQL/CovenantSQL/utils"
3131
"github.com/CovenantSQL/CovenantSQL/utils/log"
3232
)
3333

@@ -69,7 +69,7 @@ func initNode() (server *rpc.Server, err error) {
6969
}
7070

7171
func createServer(privateKeyPath, pubKeyStorePath string, masterKey []byte, listenAddr string) (server *rpc.Server, err error) {
72-
os.Remove(pubKeyStorePath)
72+
utils.RemoveAll(pubKeyStorePath + "*")
7373

7474
server = rpc.NewServer()
7575
if err != nil {
Collapse file

‎cmd/cqld/bench_test.go‎

Copy file name to clipboardExpand all lines: cmd/cqld/bench_test.go
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func start3BPs() {
6363
var cmd *utils.CMD
6464
os.Remove(FJ(testWorkingDir, "./node_0/chain.db"))
6565
os.Remove(FJ(testWorkingDir, "./node_0/dht.db"))
66-
os.Remove(FJ(testWorkingDir, "./node_0/public.keystore"))
66+
utils.RemoveAll(FJ(testWorkingDir, "./node_0/public.keystore*"))
6767
if cmd, err = utils.RunCommandNB(
6868
FJ(baseDir, "./bin/cqld.test"),
6969
[]string{"-config", FJ(testWorkingDir, "./node_0/config.yaml"),
@@ -77,7 +77,7 @@ func start3BPs() {
7777
}
7878
os.Remove(FJ(testWorkingDir, "./node_1/chain.db"))
7979
os.Remove(FJ(testWorkingDir, "./node_1/dht.db"))
80-
os.Remove(FJ(testWorkingDir, "./node_1/public.keystore"))
80+
utils.RemoveAll(FJ(testWorkingDir, "./node_1/public.keystore*"))
8181
if cmd, err = utils.RunCommandNB(
8282
FJ(baseDir, "./bin/cqld.test"),
8383
[]string{"-config", FJ(testWorkingDir, "./node_1/config.yaml"),
@@ -91,7 +91,7 @@ func start3BPs() {
9191
}
9292
os.Remove(FJ(testWorkingDir, "./node_2/chain.db"))
9393
os.Remove(FJ(testWorkingDir, "./node_2/dht.db"))
94-
os.Remove(FJ(testWorkingDir, "./node_2/public.keystore"))
94+
utils.RemoveAll(FJ(testWorkingDir, "./node_2/public.keystore*"))
9595
if cmd, err = utils.RunCommandNB(
9696
FJ(baseDir, "./bin/cqld.test"),
9797
[]string{"-config", FJ(testWorkingDir, "./node_2/config.yaml"),
@@ -104,7 +104,7 @@ func start3BPs() {
104104
log.Errorf("start node failed: %v", err)
105105
}
106106
os.Remove(FJ(testWorkingDir, "./node_c/dht.db"))
107-
os.Remove(FJ(testWorkingDir, "./node_c/public.keystore"))
107+
utils.RemoveAll(FJ(testWorkingDir, "./node_c/public.keystore*"))
108108
}
109109

110110
func stopNodes() {

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.