From c5e1b60b4d9ca9fd6bdbc849ba9b243ab05e51de Mon Sep 17 00:00:00 2001 From: Simon Pasquier Date: Mon, 11 Jul 2022 18:18:24 +0200 Subject: [PATCH] config: ignore deprecated warning in tests (#389) (*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 722c7fea..66b5141a 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()) }