From 16938b6e733f5351c17700ee976f88a759dd723a Mon Sep 17 00:00:00 2001 From: Ted Lilley Date: Thu, 20 Oct 2022 14:53:13 -0400 Subject: [PATCH] Fix parallel invocation and also a couple typos per the spellchecker. --- logrusr_test.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/logrusr_test.go b/logrusr_test.go index 80ce4f7..fe485a2 100644 --- a/logrusr_test.go +++ b/logrusr_test.go @@ -129,7 +129,7 @@ func TestLogging(t *testing.T) { }, }, { - description: "addative V-logging, negatives ignored", + description: "additive V-logging, negatives ignored", logrusLevel: logrus.TraceLevel, logFunc: func(log logr.Logger) { log.V(0).V(1).V(-20).V(1).Info("hello, world") @@ -163,7 +163,7 @@ func TestLogging(t *testing.T) { }, }, { - description: "error logs have the approperate information", + description: "error logs have the appropriate information", logFunc: func(log logr.Logger) { log.Error(errors.New("this is error"), "error occurred") }, @@ -272,6 +272,9 @@ func TestLogging(t *testing.T) { for _, tc := range cases { t.Run(tc.description, func(t *testing.T) { + tc := tc + t.Parallel() + // Use a buffer for our output. logWriter := &bytes.Buffer{} @@ -322,7 +325,7 @@ func TestLogging(t *testing.T) { } // Annotate regexp matches with the value starting with a tilde - // (~). The tilde will be dropped an used to compile a regexp to + // (~). The tilde will be dropped and used to compile a regexp to // match the field. if strings.HasPrefix(v, "~") { assert.Regexp(t, regexp.MustCompile(v[1:]), field)