Solve missing TODOs

This commit is contained in:
Michal Horejsek
2021-01-18 08:20:53 +01:00
parent debf015dd0
commit 32db6b8d44
4 changed files with 19 additions and 4 deletions

View File

@ -93,7 +93,12 @@ func (f *frontendCLI) notifyLogout(address string) {
} }
func (f *frontendCLI) notifyNeedUpgrade() { 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] func (f *frontendCLI) notifyCredentialsError() { // nolint[unused]

View File

@ -93,7 +93,12 @@ func (f *frontendCLI) notifyLogout(address string) {
} }
func (f *frontendCLI) notifyNeedUpgrade() { 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] func (f *frontendCLI) notifyCredentialsError() { // nolint[unused]

View File

@ -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 .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 GO111MODULE=on
export BRIDGE_VERSION:=1.3.0-integrationtests export BRIDGE_VERSION:=1.5.5-integrationtests
export VERBOSITY?=fatal export VERBOSITY?=fatal
export TEST_DATA=testdata export TEST_DATA=testdata
export TEST_APP?=bridge export TEST_APP?=bridge

View File

@ -22,6 +22,7 @@ import (
"sync" "sync"
"github.com/ProtonMail/proton-bridge/internal/bridge" "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/importexport"
"github.com/ProtonMail/proton-bridge/internal/transfer" "github.com/ProtonMail/proton-bridge/internal/transfer"
"github.com/ProtonMail/proton-bridge/internal/users" "github.com/ProtonMail/proton-bridge/internal/users"
@ -94,7 +95,11 @@ type TestContext struct {
func New(app string) *TestContext { func New(app string) *TestContext {
setLogrusVerbosityFromEnv() 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{ ctx := &TestContext{
t: &bddT{}, t: &bddT{},