config: Migrate to the new version. Remove backend details.

Migrate to new config format v4.
```
{
	"version": "4",
	"credential": {
		"accessKey": "WLGDGYAQYIGI833EV05A",
		"secretKey": "BYvgJM101sHngl2uzjXS/OBF/aMxAN06JrJ3qJlF"
	},
	"region": "us-east-1",
	"logger": {
		"console": {
			"enable": true,
			"level": "fatal"
		},
		"file": {
			"enable": false,
			"fileName": "",
			"level": "error"
		},
		"syslog": {
			"enable": false,
			"address": "",
			"level": "debug"
		}
	}
}
```

This patch also updates [minio cli spec](./minio.md)
This commit is contained in:
Harshavardhana
2016-04-01 19:19:44 -07:00
parent 6037fe66e9
commit 484ba91b08
10 changed files with 255 additions and 227 deletions
+5 -5
View File
@@ -81,15 +81,15 @@ func (s *MyAPISuite) SetUpSuite(c *C) {
// Initialize server config.
initConfig()
// Set port.
addr := ":" + strconv.Itoa(getFreePort())
// Get credential.
s.credential = serverConfig.GetCredential()
// Set a default region.
serverConfig.SetRegion("us-east-1")
// Set a new address.
serverConfig.SetAddr(":" + strconv.Itoa(getFreePort()))
// Do this only once here
setGlobalConfigPath(root)
@@ -99,8 +99,8 @@ func (s *MyAPISuite) SetUpSuite(c *C) {
fs, err := newFS(fsroot)
c.Assert(err, IsNil)
httpHandler := configureServerHandler(fs)
testAPIFSCacheServer = httptest.NewServer(httpHandler)
apiServer := configureServer(addr, fs)
testAPIFSCacheServer = httptest.NewServer(apiServer.Handler)
}
func (s *MyAPISuite) TearDownSuite(c *C) {