config/logger: remove syslogger and upgrade to config v10 which eliminates syslog config (#3336)

This commit is contained in:
Anis Elleuch
2016-11-24 00:00:53 +01:00
committed by Harshavardhana
parent f4f512fedd
commit 14cb3645a3
10 changed files with 190 additions and 190 deletions

View File

@@ -19,12 +19,9 @@ package cmd
import (
"io/ioutil"
"os"
"strconv"
"testing"
)
const lastConfigVersion = 9
// Test if config v1 is purged
func TestServerConfigMigrateV1(t *testing.T) {
rootPath, err := newTestConfig("us-east-1")
@@ -97,10 +94,13 @@ func TestServerConfigMigrateInexistentConfig(t *testing.T) {
if err := migrateV8ToV9(); err != nil {
t.Fatal("migrate v8 to v9 should succeed when no config file is found")
}
if err := migrateV9ToV10(); err != nil {
t.Fatal("migrate v9 to v10 should succeed when no config file is found")
}
}
// Test if a config migration from v2 to v9 is successfully done
func TestServerConfigMigrateV2toV9(t *testing.T) {
// Test if a config migration from v2 to v10 is successfully done
func TestServerConfigMigrateV2toV10(t *testing.T) {
rootPath, err := newTestConfig("us-east-1")
if err != nil {
t.Fatalf("Init Test config failed")
@@ -139,7 +139,7 @@ func TestServerConfigMigrateV2toV9(t *testing.T) {
}
// Check the version number in the upgraded config file
expectedVersion := strconv.Itoa(lastConfigVersion)
expectedVersion := globalMinioConfigVersion
if serverConfig.Version != expectedVersion {
t.Fatalf("Expect version "+expectedVersion+", found: %v", serverConfig.Version)
}
@@ -197,4 +197,7 @@ func TestServerConfigMigrateFaultyConfig(t *testing.T) {
if err := migrateV8ToV9(); err == nil {
t.Fatal("migrateConfigV8ToV9() should fail with a corrupted json")
}
if err := migrateV9ToV10(); err == nil {
t.Fatal("migrateConfigV9ToV10() should fail with a corrupted json")
}
}