Add updateConfig code to load config changes if possible for every function

This commit is contained in:
Harshavardhana
2015-07-05 22:17:56 -07:00
parent 36835befe6
commit 10b082144e
7 changed files with 138 additions and 56 deletions
+5 -1
View File
@@ -62,11 +62,15 @@ func (s *MyDonutSuite) SetUpSuite(c *C) {
s.root = root
conf := new(Config)
conf.Version = "0.0.1"
conf.DonutName = "test"
conf.NodeDiskMap = createTestNodeDiskMap(root)
conf.MaxSize = 100000
customConfigPath = filepath.Join(root, "donut.json")
err = SaveConfig(conf)
c.Assert(err, IsNil)
dd, err = New(conf)
dd, err = New()
c.Assert(err, IsNil)
// testing empty donut