mirror of
https://github.com/minio/minio.git
synced 2026-02-04 18:00:15 -05:00
Support in-place upgrades of new minio binary and releases. (#4961)
This PR allows 'minio update' to not only shows update banner but also allows for in-place upgrades. Updates are done safely by validating the downloaded sha256 of the binary. Fixes #4781
This commit is contained in:
committed by
Dee Koder
parent
8c08571cd9
commit
eb7c690ea9
@@ -26,7 +26,7 @@ import (
|
||||
)
|
||||
|
||||
// Tests update notifier string builder.
|
||||
func TestComputeUpdateMessage(t *testing.T) {
|
||||
func TestPrepareUpdateMessage(t *testing.T) {
|
||||
testCases := []struct {
|
||||
older time.Duration
|
||||
dlURL string
|
||||
@@ -71,7 +71,7 @@ func TestComputeUpdateMessage(t *testing.T) {
|
||||
cyan := color.New(color.FgCyan, color.Bold).SprintFunc()
|
||||
|
||||
for i, testCase := range testCases {
|
||||
output := computeUpdateMessage(testCase.dlURL, testCase.older)
|
||||
output := prepareUpdateMessage(testCase.dlURL, testCase.older)
|
||||
line1 := fmt.Sprintf("%s %s", plainMsg, yellow(testCase.expectedSubStr))
|
||||
line2 := fmt.Sprintf("Update: %s", cyan(testCase.dlURL))
|
||||
// Uncomment below to see message appearance:
|
||||
|
||||
Reference in New Issue
Block a user