diff --git a/supernode/config/config_test.go b/supernode/config/config_test.go index a141cf42a..0383577d2 100644 --- a/supernode/config/config_test.go +++ b/supernode/config/config_test.go @@ -56,7 +56,8 @@ func (s *SupernodeConfigTestSuite) SetUpSuite(c *check.C) { func (s *SupernodeConfigTestSuite) TearDownSuite(c *check.C) { if s.workHome != "" { - os.RemoveAll(s.workHome) + err := os.RemoveAll(s.workHome) + c.Assert(err, check.IsNil) } } @@ -65,13 +66,16 @@ func (s *SupernodeConfigTestSuite) TestConfig_Load(c *check.C) { conf := NewConfig() exp := &Config{} - ioutil.WriteFile(confPath, []byte(conf.String()), os.ModePerm) - exp.Load(confPath) + err := ioutil.WriteFile(confPath, []byte(conf.String()), os.ModePerm) + c.Assert(err, check.IsNil) + err = exp.Load(confPath) + c.Assert(err, check.IsNil) c.Assert(conf.BaseProperties, check.DeepEquals, exp.BaseProperties) conf = &Config{} - ioutil.WriteFile(confPath, []byte(content), os.ModePerm) - err := conf.Load(confPath) + err = ioutil.WriteFile(confPath, []byte(content), os.ModePerm) + c.Assert(err, check.IsNil) + err = conf.Load(confPath) c.Assert(err, check.IsNil) c.Assert(conf.HomeDir, check.Equals, "/tmp") c.Assert(conf.Plugins[StoragePlugin], check.NotNil)