itest: move all test db files when using both etcd and bbolt
In some tests we moved channeld.db to a temp location in order to "time travel". This commit extends the existing semantics by moving all files, including embedded etcd db too besides the channeld.db file.
This commit is contained in:
3 files changed
+66
-18
No files matched your search
+11
-2
@@ -199,9 +199,13 @@ func (cfg NodeConfig) RESTAddr() string {
|
||||
return net.JoinHostPort("127.0.0.1", strconv.Itoa(cfg.RESTPort))
|
||||
}
|
||||
|
||||
// DBDir returns the holding directory path of the graph database.
|
||||
func (cfg NodeConfig) DBDir() string {
|
||||
return filepath.Join(cfg.DataDir, "graph", cfg.NetParams.Name)
|
||||
}
|
||||
|
||||
func (cfg NodeConfig) DBPath() string {
|
||||
return filepath.Join(cfg.DataDir, "graph",
|
||||
fmt.Sprintf("%v/channel.db", cfg.NetParams.Name))
|
||||
return filepath.Join(cfg.DBDir(), "channel.db")
|
||||
}
|
||||
|
||||
func (cfg NodeConfig) ChanBackupPath() string {
|
||||
@@ -440,6 +444,11 @@ func (hn *HarnessNode) DBPath() string {
|
||||
return hn.Cfg.DBPath()
|
||||
}
|
||||
|
||||
// DBDir returns the path for the directory holding channeldb file(s).
|
||||
func (hn *HarnessNode) DBDir() string {
|
||||
return hn.Cfg.DBDir()
|
||||
}
|
||||
|
||||
// Name returns the name of this node set during initialization.
|
||||
func (hn *HarnessNode) Name() string {
|
||||
return hn.Cfg.Name
|
||||
|
||||
Reference in new issue
Block a user