Skip to content

Commit c5e1b60

Browse files
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 <[email protected]>
1 parent b86ea81 commit c5e1b60

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

config/http_config_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,7 @@ func TestTLSConfig(t *testing.T) {
664664

665665
// tlsConfig.rootCAs.LazyCerts contains functions getCert() in go 1.16, which are
666666
// never equal. Compare the Subjects instead.
667+
//nolint:staticcheck // Ignore SA1019. (*CertPool).Subjects is deprecated because it may not include the system certs but it isn't the case here.
667668
if !reflect.DeepEqual(tlsConfig.RootCAs.Subjects(), expectedTLSConfig.RootCAs.Subjects()) {
668669
t.Fatalf("Unexpected RootCAs result: \n\n%+v\n expected\n\n%+v", tlsConfig.RootCAs.Subjects(), expectedTLSConfig.RootCAs.Subjects())
669670
}

0 commit comments

Comments
 (0)