diff --git a/reference/normalize_test.go b/reference/normalize_test.go index 0932d06f4..f1b6f27ae 100644 --- a/reference/normalize_test.go +++ b/reference/normalize_test.go @@ -269,6 +269,7 @@ func TestParseRepositoryInfo(t *testing.T) { } for _, r := range refStrings { + r := r t.Run(strconv.Itoa(i)+"/"+r, func(t *testing.T) { t.Parallel() named, err := ParseNormalizedNamed(r) diff --git a/registry/api/errcode/errors_test.go b/registry/api/errcode/errors_test.go index 6a7eb7d2a..105d9f7ce 100644 --- a/registry/api/errcode/errors_test.go +++ b/registry/api/errcode/errors_test.go @@ -39,9 +39,11 @@ func TestErrorCodes(t *testing.T) { t.Fatal("errors aren't loaded!") } - for ec, desc := range errorCodeToDescriptors { + for ec := range errorCodeToDescriptors { + ec := ec t.Run(ec.String(), func(t *testing.T) { t.Parallel() + desc := errorCodeToDescriptors[ec] if ec != desc.Code { t.Fatalf("error code in descriptor isn't correct, %q != %q", ec, desc.Code) }