Skip to content

Commit

Permalink
Fix range variable in archiver_test not being captured
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelSnowden committed Dec 19, 2022
1 parent edd3f0a commit dd3e631
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions service/history/archival/archiver_test.go
Expand Up @@ -27,7 +27,6 @@ package archival
import (
"context"
"errors"
"fmt"
"testing"

"github.com/golang/mock/gomock"
Expand Down Expand Up @@ -244,6 +243,7 @@ func TestArchiver(t *testing.T) {
},
},
} {
c := c // capture range variable
t.Run(c.Name, func(t *testing.T) {
t.Parallel()
ctx := context.Background()
Expand Down Expand Up @@ -324,9 +324,9 @@ func (r *errorLogRecorder) Error(msg string, tags ...tag.Tag) {
for _, t := range tags {
if t.Key() == "error" {
value := t.Value()
message, ok := value.(fmt.Stringer)
message, ok := value.(string)
require.True(r.T, ok)
r.ErrorMessages = append(r.ErrorMessages, message.String())
r.ErrorMessages = append(r.ErrorMessages, message)
}
}
}

0 comments on commit dd3e631

Please sign in to comment.