From b16df789f03a1e3aa549f85c72c25ded488ae754 Mon Sep 17 00:00:00 2001 From: Simon Pasquier Date: Fri, 8 Jul 2022 14:53:49 +0200 Subject: [PATCH] config: ignore deprecated warning in tests (*CertPool).Subjects is deprecated in Go 1.18 because it may not include the system certs but it isn't a problem for the tests because we're not loading the system certs. Signed-off-by: Simon Pasquier --- config/http_config_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/config/http_config_test.go b/config/http_config_test.go index 42cd851b..4e1dd831 100644 --- a/config/http_config_test.go +++ b/config/http_config_test.go @@ -664,6 +664,7 @@ func TestTLSConfig(t *testing.T) { // tlsConfig.rootCAs.LazyCerts contains functions getCert() in go 1.16, which are // never equal. Compare the Subjects instead. + //nolint:staticcheck // Ignore SA1019. (*CertPool).Subjects is deprecated because it may not include the system certs but it isn't the case here. if !reflect.DeepEqual(tlsConfig.RootCAs.Subjects(), expectedTLSConfig.RootCAs.Subjects()) { t.Fatalf("Unexpected RootCAs result: \n\n%+v\n expected\n\n%+v", tlsConfig.RootCAs.Subjects(), expectedTLSConfig.RootCAs.Subjects()) }