diff --git a/configuration_test.go b/configuration_test.go index 7dcf099..eecf956 100644 --- a/configuration_test.go +++ b/configuration_test.go @@ -95,7 +95,6 @@ func TestConfigurationValidation(t *testing.T) { expMsg: `app version must be valid semver`, }, } { - tc := tc t.Run(tc.name, func(t *testing.T) { err := tc.cfg.validate() if err == nil { diff --git a/context_test.go b/context_test.go index 5516e1a..b40dac9 100644 --- a/context_test.go +++ b/context_test.go @@ -76,7 +76,6 @@ func TestContextWithMethods(t *testing.T) { {"WithMetadatum", func() { n.WithMetadatum(ctx, "whatever", "foo", "bar") }}, {"WithUser", func() { n.WithUser(ctx, User{}) }}, } { - tc := tc t.Run(tc.name, func(t *testing.T) { t.Parallel() defer func() { diff --git a/error_test.go b/error_test.go index 24b0ad0..a1c3e1f 100644 --- a/error_test.go +++ b/error_test.go @@ -20,7 +20,6 @@ func TestSeverityReasonType(t *testing.T) { {exp: "userSpecifiedSeverity", err: Error{Severity: SeverityError}}, {exp: "userSpecifiedSeverity", err: Error{Severity: SeverityError, Unhandled: true, Panic: true}}, } { - tc := tc t.Run(tc.exp, func(t *testing.T) { t.Parallel() if got := severityReasonType(&tc.err); got != tc.exp { @@ -101,7 +100,6 @@ func TestWrap(t *testing.T) { {ctx: nil, err: err, msg: fmtBase, args: args, expErrString: wrappedFmtMsg, name: "all args but ctx"}, {ctx: ctx, err: err, msg: fmtBase, args: args, expErrString: wrappedFmtMsg, name: "all args"}, } { - tc := tc t.Run(tc.name, func(t *testing.T) { t.Parallel() if tc.msg != "" || tc.args != nil { diff --git a/notifier_test.go b/notifier_test.go index 0dcbe2a..92fa518 100644 --- a/notifier_test.go +++ b/notifier_test.go @@ -25,7 +25,6 @@ func TestApp(t *testing.T) { exp: `{ "duration": 5000, "releaseStage": "staging", "version": "1.5.2" }`, }, } { - tc := tc t.Run(tc.name, func(t *testing.T) { t.Parallel() tc.cfg.appStartTime = time.Now().Add(-5 * time.Second) diff --git a/session_test.go b/session_test.go index c7bbf91..4fb77c6 100644 --- a/session_test.go +++ b/session_test.go @@ -80,7 +80,6 @@ func TestSessionAndContext(t *testing.T) { {expUnhandledCount: 1, expHandledCount: 0, name: "unhandled", unhandled: true}, {expUnhandledCount: 0, expHandledCount: 1, name: "handled", unhandled: false}, } { - tc := tc t.Run(tc.name, func(t *testing.T) { t.Parallel() n, err := New(Configuration{APIKey: "abcd1234abcd1234abcd1234abcd1234", ReleaseStage: "dev", AppVersion: "1.2.3"})