mirror of
https://github.com/pgsty/minio.git
synced 2026-07-19 04:00:25 +03:00
Ensure that setConfig uses latest functionality (#6302)
This commit is contained in:
committed by
kannappanr
parent
50a817e3d3
commit
9f14433cbd
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user