Ensure that setConfig uses latest functionality (#6302)

This commit is contained in:
Harshavardhana
2018-08-17 18:51:34 -07:00
committed by kannappanr
parent 50a817e3d3
commit 9f14433cbd
13 changed files with 150 additions and 905 deletions
+2 -6
View File
@@ -21,8 +21,6 @@ import (
"strings"
"testing"
"time"
"github.com/fatih/color"
)
// Tests update notifier string builder.
@@ -67,13 +65,11 @@ func TestPrepareUpdateMessage(t *testing.T) {
}
plainMsg := "You are running an older version of Minio released"
yellow := color.New(color.FgYellow, color.Bold).SprintfFunc()
cyan := color.New(color.FgCyan, color.Bold).SprintFunc()
for i, testCase := range testCases {
output := prepareUpdateMessage(testCase.dlURL, testCase.older)
line1 := fmt.Sprintf("%s %s", plainMsg, yellow(testCase.expectedSubStr))
line2 := fmt.Sprintf("Update: %s", cyan(testCase.dlURL))
line1 := fmt.Sprintf("%s %s", plainMsg, colorYellowBold(testCase.expectedSubStr))
line2 := fmt.Sprintf("Update: %s", colorCyanBold(testCase.dlURL))
// Uncomment below to see message appearance:
// fmt.Println(output)
switch {