diff --git a/internal/frontend/cli-ie/utils.go b/internal/frontend/cli-ie/utils.go index 5057a223..5b4f58f1 100644 --- a/internal/frontend/cli-ie/utils.go +++ b/internal/frontend/cli-ie/utils.go @@ -93,7 +93,12 @@ func (f *frontendCLI) notifyLogout(address string) { } func (f *frontendCLI) notifyNeedUpgrade() { - f.Println("TODO") + version, err := f.updater.Check() + if err != nil { + log.WithError(err).Error("Failed to notify need upgrade") + return + } + f.Println("Please download and install the newest version of application from", version.LandingPage) } func (f *frontendCLI) notifyCredentialsError() { // nolint[unused] diff --git a/internal/frontend/cli/utils.go b/internal/frontend/cli/utils.go index b7ce01c3..2a659e67 100644 --- a/internal/frontend/cli/utils.go +++ b/internal/frontend/cli/utils.go @@ -93,7 +93,12 @@ func (f *frontendCLI) notifyLogout(address string) { } func (f *frontendCLI) notifyNeedUpgrade() { - f.Println("TODO") + version, err := f.updater.Check() + if err != nil { + log.WithError(err).Error("Failed to notify need upgrade") + return + } + f.Println("Please download and install the newest version of application from", version.LandingPage) } func (f *frontendCLI) notifyCredentialsError() { // nolint[unused] diff --git a/test/Makefile b/test/Makefile index 900ab261..4c6de2c9 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,7 +1,7 @@ .PHONY: check-go check-godog install-godog test test-bridge test-ie test-live test-live-bridge test-live-ie test-stage test-debug test-live-debug bench export GO111MODULE=on -export BRIDGE_VERSION:=1.3.0-integrationtests +export BRIDGE_VERSION:=1.5.5-integrationtests export VERBOSITY?=fatal export TEST_DATA=testdata export TEST_APP?=bridge diff --git a/test/context/context.go b/test/context/context.go index 382ee098..2b1d4237 100644 --- a/test/context/context.go +++ b/test/context/context.go @@ -22,6 +22,7 @@ import ( "sync" "github.com/ProtonMail/proton-bridge/internal/bridge" + "github.com/ProtonMail/proton-bridge/internal/constants" "github.com/ProtonMail/proton-bridge/internal/importexport" "github.com/ProtonMail/proton-bridge/internal/transfer" "github.com/ProtonMail/proton-bridge/internal/users" @@ -94,7 +95,11 @@ type TestContext struct { func New(app string) *TestContext { setLogrusVerbosityFromEnv() - cm := pmapi.NewClientManager(pmapi.GetAPIConfig("TODO", "TODO")) + configName := app + if app == "ie" { + configName = "importExport" + } + cm := pmapi.NewClientManager(pmapi.GetAPIConfig(configName, constants.Version)) ctx := &TestContext{ t: &bddT{},