update: Change update notifier for new style banner. (#3289)

For binary releases and operating systems it would be

All operating systems.
```
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Minio is 25 days 12 hours 30 minutes old                           ┃
┃ Update: https://dl.minio.io/server/minio/release/linux-amd64/minio ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
```

On docker.
```
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Minio is 25 days 12 hours 32 minutes old ┃
┃ Update: docker pull minio/minio          ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
```
This commit is contained in:
Harshavardhana
2016-11-19 23:20:13 -08:00
committed by GitHub
parent 1c47365445
commit 2c3a2241e7
8 changed files with 289 additions and 64 deletions
+4 -5
View File
@@ -47,9 +47,9 @@ func TestReleaseUpdateVersion(t *testing.T) {
{
updateURL: ts.URL,
updateMsg: updateMessage{
Download: ts.URL + "/" + runtime.GOOS + "-" + runtime.GOARCH + "/minio.exe",
Version: "2016-10-06T00:08:32Z",
Update: true,
Download: ts.URL + "/" + runtime.GOOS + "-" + runtime.GOARCH + "/minio.exe",
Update: true,
NewerThan: 90487000000000,
},
errMsg: "",
shouldPass: true,
@@ -87,9 +87,8 @@ func TestReleaseUpdate(t *testing.T) {
updateURL: ts.URL,
updateMsg: updateMessage{
Download: ts.URL + "/" + runtime.GOOS + "-" + runtime.GOARCH + "/minio.exe",
Version: "DEVELOPMENT.GOGET",
},
errMsg: "Unable to parse version string as time.",
errMsg: "Failed to retrieve update notice. Please try again later. Please report this issue at https://github.com/minio/minio/issues",
shouldPass: false,
},
}