Skip to content

Commit

Permalink
satellite/console: don't use global log
Browse files Browse the repository at this point in the history
Change-Id: I2464f2aca3cdb97c19de29dac59499cc9d5ff2bb
  • Loading branch information
egonelbre committed Jul 6, 2022
1 parent 6f4dc96 commit 4e31c96
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion satellite/console/consoleweb/consoleapi/auth_test.go
Expand Up @@ -212,6 +212,7 @@ func TestAuth_Register_CORS(t *testing.T) {

func TestDeleteAccount(t *testing.T) {
ctx := testcontext.New(t)
log := testplanet.NewLogger(t)

// We do a black box testing because currently we don't allow to delete
// accounts through the API hence we must always return an error response.
Expand Down Expand Up @@ -298,7 +299,7 @@ func TestDeleteAccount(t *testing.T) {

actualHandler := func(r *http.Request) (status int, body []byte) {
rr := httptest.NewRecorder()
authController := consoleapi.NewAuth(zap.L(), nil, nil, nil, nil, nil, "", "", "", "")
authController := consoleapi.NewAuth(log, nil, nil, nil, nil, nil, "", "", "", "")
authController.DeleteAccount(rr, r)

//nolint:bodyclose
Expand Down
3 changes: 1 addition & 2 deletions satellite/console/emailreminders/chore.go
Expand Up @@ -82,14 +82,13 @@ func (chore *Chore) Run(ctx context.Context) (err error) {
mon.IntVal("unverified_needing_reminder").Observe(int64(len(users)))

for _, u := range users {

token, err := chore.tokens.CreateToken(ctx, u.ID, u.Email)

if err != nil {
chore.log.Error("error generating activation token", zap.Error(err))
return nil
}
authController := consoleapi.NewAuth(zap.L(), nil, nil, nil, nil, nil, chore.address, "", "", "")
authController := consoleapi.NewAuth(chore.log, nil, nil, nil, nil, nil, chore.address, "", "", "")

link := authController.ActivateAccountURL + "?token=" + token
userName := u.ShortName
Expand Down

1 comment on commit 4e31c96

@storjrobot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has been mentioned on Storj Community Forum (official). There might be relevant details there:

https://forum.storj.io/t/release-preparation-v1-59/18983/1

Please sign in to comment.