mainUpdate: refactor to handle quiet flag properly (#3744)

This commit is contained in:
Bala FA
2017-02-15 14:01:00 +05:30
committed by Harshavardhana
parent c6e76160ad
commit 602dac8773
6 changed files with 479 additions and 438 deletions

View File

@@ -24,12 +24,11 @@ import (
// Tests update notifier string builder.
func TestUpdateNotifier(t *testing.T) {
updateMsg := minioUpdateStableURL
colorUpdateMsg := colorizeUpdateMessage(updateMsg, time.Duration(72*time.Hour))
if strings.Index(colorUpdateMsg, "minutes") == -1 {
colorUpdateMsg := colorizeUpdateMessage(minioReleaseURL, time.Duration(72*time.Hour))
if !strings.Contains(colorUpdateMsg, "minutes") {
t.Fatal("Duration string not found in colorized update message", colorUpdateMsg)
}
if strings.Index(colorUpdateMsg, updateMsg) == -1 {
t.Fatal("Update message not found in colorized update message", updateMsg)
if !strings.Contains(colorUpdateMsg, minioReleaseURL) {
t.Fatal("Update message not found in colorized update message", minioReleaseURL)
}
}