From 88a50bddcde56f6df01edb52c060afb42424423a Mon Sep 17 00:00:00 2001 From: Sourav Sarangi Date: Mon, 11 Mar 2024 11:50:28 +0530 Subject: [PATCH] testutils: add asn1 to allowed Marshal functions list Release note: None Epic: None Release justification: We will need encoding/asn1 library to support marshalling/unmarshalling of DER encoded values used in crypto/x509 library for raw subject and subject fields. This is needed for https://github.com/cockroachdb/cockroach/pull/119958 --- pkg/testutils/lint/lint_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/testutils/lint/lint_test.go b/pkg/testutils/lint/lint_test.go index e6b56de44a4a..a3440cc3b4be 100644 --- a/pkg/testutils/lint/lint_test.go +++ b/pkg/testutils/lint/lint_test.go @@ -1281,7 +1281,7 @@ func TestLint(t *testing.T) { if err := stream.ForEach(stream.Sequence( filter, - stream.GrepNot(`(json|jsonpb|yaml|protoutil|xml|\.Field|ewkb|wkb|wkt)\.Marshal\(`), + stream.GrepNot(`(json|jsonpb|yaml|protoutil|xml|\.Field|ewkb|wkb|wkt|asn1)\.Marshal\(`), ), func(s string) { t.Errorf("\n%s <- forbidden; use 'protoutil.Marshal' instead", s) }); err != nil { @@ -1326,7 +1326,7 @@ func TestLint(t *testing.T) { if err := stream.ForEach(stream.Sequence( filter, - stream.GrepNot(`(json|jsonpb|yaml|xml|protoutil|toml|Codec|ewkb|wkb|wkt)\.Unmarshal\(`), + stream.GrepNot(`(json|jsonpb|yaml|xml|protoutil|toml|Codec|ewkb|wkb|wkt|asn1)\.Unmarshal\(`), ), func(s string) { t.Errorf("\n%s <- forbidden; use 'protoutil.Unmarshal' instead", s) }); err != nil {