config: Remove level in console/file loggers (#3938)

Also rename fileName field in file logger to filename
This commit is contained in:
Anis Elleuch
2017-03-23 16:27:22 +01:00
committed by Harshavardhana
parent 4e92b2ecb8
commit 11e15f9b4c
8 changed files with 205 additions and 86 deletions

View File

@@ -112,10 +112,13 @@ func TestServerConfigMigrateInexistentConfig(t *testing.T) {
if err := migrateV14ToV15(); err != nil {
t.Fatal("migrate v14 to v15 should succeed when no config file is found")
}
if err := migrateV15ToV16(); err != nil {
t.Fatal("migrate v15 to v16 should succeed when no config file is found")
}
}
// Test if a config migration from v2 to v15 is successfully done
func TestServerConfigMigrateV2toV15(t *testing.T) {
// Test if a config migration from v2 to v16 is successfully done
func TestServerConfigMigrateV2toV16(t *testing.T) {
rootPath, err := newTestConfig(globalMinioDefaultRegion)
if err != nil {
t.Fatalf("Init Test config failed")
@@ -154,7 +157,7 @@ func TestServerConfigMigrateV2toV15(t *testing.T) {
}
// Check the version number in the upgraded config file
expectedVersion := v15
expectedVersion := v16
if serverConfig.Version != expectedVersion {
t.Fatalf("Expect version "+expectedVersion+", found: %v", serverConfig.Version)
}
@@ -225,4 +228,7 @@ func TestServerConfigMigrateFaultyConfig(t *testing.T) {
if err := migrateV14ToV15(); err == nil {
t.Fatal("migrateConfigV14ToV15() should fail with a corrupted json")
}
if err := migrateV15ToV16(); err == nil {
t.Fatal("migrateConfigV15ToV16() should fail with a corrupted json")
}
}