Merge pull request #607 from mattmoyer/fix-eks-nested-impersonation-tests
Fix TestImpersonationProxy on EKS.
This commit is contained in:
commit
9fc7f43245
@ -1705,8 +1705,8 @@ func getCredForConfig(t *testing.T, config *rest.Config) *loginv1alpha1.ClusterC
|
|||||||
if tlsConfig != nil && tlsConfig.GetClientCertificate != nil {
|
if tlsConfig != nil && tlsConfig.GetClientCertificate != nil {
|
||||||
cert, err := tlsConfig.GetClientCertificate(nil)
|
cert, err := tlsConfig.GetClientCertificate(nil)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
if len(cert.Certificate) > 0 {
|
||||||
require.Len(t, cert.Certificate, 1)
|
require.Len(t, cert.Certificate, 1)
|
||||||
|
|
||||||
publicKey := pem.EncodeToMemory(&pem.Block{
|
publicKey := pem.EncodeToMemory(&pem.Block{
|
||||||
Type: "CERTIFICATE",
|
Type: "CERTIFICATE",
|
||||||
Bytes: cert.Certificate[0],
|
Bytes: cert.Certificate[0],
|
||||||
@ -1717,6 +1717,7 @@ func getCredForConfig(t *testing.T, config *rest.Config) *loginv1alpha1.ClusterC
|
|||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
out.ClientKeyData = string(privateKey)
|
out.ClientKeyData = string(privateKey)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if *out == (loginv1alpha1.ClusterCredential{}) {
|
if *out == (loginv1alpha1.ClusterCredential{}) {
|
||||||
t.Fatal("failed to get creds for config")
|
t.Fatal("failed to get creds for config")
|
||||||
|
Loading…
Reference in New Issue
Block a user