Skip to content
Snippets Groups Projects
Unverified Commit d27a802e authored by Silas Davis's avatar Silas Davis
Browse files

Get defer in the right place

parent ed509af1
No related branches found
No related tags found
No related merge requests found
...@@ -54,7 +54,7 @@ func loadModuleConfigFromDo(do *definitions.Do, module string) (*config.ModuleCo ...@@ -54,7 +54,7 @@ func loadModuleConfigFromDo(do *definitions.Do, module string) (*config.ModuleCo
func LoadModuleConfig(conf *viper.Viper, rootWorkDir, rootDataDir, func LoadModuleConfig(conf *viper.Viper, rootWorkDir, rootDataDir,
genesisFile, chainId, module string) (*config.ModuleConfig, error) { genesisFile, chainId, module string) (*config.ModuleConfig, error) {
moduleName := conf.GetString("chain." + module + ".name") moduleName := conf.GetString("chain." + module + ".name")
fmt.Println(moduleName) fmt.Println(conf)
majorVersion := conf.GetInt("chain." + module + ".major_version") majorVersion := conf.GetInt("chain." + module + ".major_version")
minorVersion := conf.GetInt("chain." + module + ".minor_version") minorVersion := conf.GetInt("chain." + module + ".minor_version")
minorVersionString := version.MakeMinorVersionString(moduleName, majorVersion, minorVersionString := version.MakeMinorVersionString(moduleName, majorVersion,
......
...@@ -9,6 +9,7 @@ import ( ...@@ -9,6 +9,7 @@ import (
// Needs to be in a _test.go file to be picked up // Needs to be in a _test.go file to be picked up
func TestMain(m *testing.M) { func TestMain(m *testing.M) {
ffs := fixtures.NewFileFixtures() ffs := fixtures.NewFileFixtures()
defer ffs.RemoveAll()
initGlobalVariables(ffs) initGlobalVariables(ffs)
...@@ -16,17 +17,16 @@ func TestMain(m *testing.M) { ...@@ -16,17 +17,16 @@ func TestMain(m *testing.M) {
panic(ffs.Error) panic(ffs.Error)
} }
defer ffs.RemoveAll()
saveNewPriv() saveNewPriv()
// start a node
ready := make(chan struct{}) ready := make(chan struct{})
go newNode(ready) go newNode(ready)
<-ready <-ready
returnValue := m.Run() returnValue := m.Run()
// start a node
os.Exit(returnValue) os.Exit(returnValue)
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment