diff --git a/api/client/credentials_test.go b/api/client/credentials_test.go index 896a873c19811..dbd9996ca3b8b 100644 --- a/api/client/credentials_test.go +++ b/api/client/credentials_test.go @@ -464,6 +464,7 @@ func TestDynamicIdentityFileCreds(t *testing.T) { require.NoError(t, err) wantTLSCert, err := tls.X509KeyPair(tlsCert, keyPEM) require.NoError(t, err) + wantTLSCert.Leaf = nil require.Equal(t, wantTLSCert, *gotTLSCert) expiry, ok := cred.Expiry() @@ -522,6 +523,7 @@ func TestDynamicIdentityFileCreds(t *testing.T) { require.NoError(t, err) wantTLSCert, err = tls.X509KeyPair(secondTLSCertPem, keyPEM) require.NoError(t, err) + wantTLSCert.Leaf = nil require.Equal(t, wantTLSCert, *gotTLSCert) expiry, ok = cred.Expiry()