mirror of
https://github.com/minio/mc.git
synced 2025-11-14 23:42:27 +03:00
Fix a config corruption bug when config.json has wrong json format, would lead to overwriting the previous config.json
This commit is contained in:
10
cmd_test.go
10
cmd_test.go
@@ -99,15 +99,15 @@ func (s *CmdTestSuite) TearDownSuite(c *C) {
|
||||
}
|
||||
|
||||
func (s *CmdTestSuite) TestGetNewClient(c *C) {
|
||||
_, err := getNewClient("http://example.com/bucket1", &hostConfig{})
|
||||
_, err := getNewClient("http://example.com/bucket1", hostConfig{})
|
||||
c.Assert(err, IsNil)
|
||||
_, err = getNewClient("https://example.com/bucket1", &hostConfig{})
|
||||
_, err = getNewClient("https://example.com/bucket1", hostConfig{})
|
||||
c.Assert(err, IsNil)
|
||||
_, err = getNewClient("C:\\Users\\Administrator\\MyDocuments", &hostConfig{})
|
||||
_, err = getNewClient("C:\\Users\\Administrator\\MyDocuments", hostConfig{})
|
||||
c.Assert(err, IsNil)
|
||||
_, err = getNewClient("/usr/bin/pandoc", &hostConfig{})
|
||||
_, err = getNewClient("/usr/bin/pandoc", hostConfig{})
|
||||
c.Assert(err, IsNil)
|
||||
_, err = getNewClient("pkg/client", &hostConfig{})
|
||||
_, err = getNewClient("pkg/client", hostConfig{})
|
||||
c.Assert(err, IsNil)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user