From 58607c7e8198de0374a24088702597b4c9244864 Mon Sep 17 00:00:00 2001 From: Ryan Richard Date: Wed, 3 Mar 2021 14:19:24 -0800 Subject: [PATCH] Update `TestCredentialIssuer` int test to ignore ImpersonationProxy type --- .../concierge_credentialissuer_test.go | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/test/integration/concierge_credentialissuer_test.go b/test/integration/concierge_credentialissuer_test.go index c7ed6e66..4a4881cb 100644 --- a/test/integration/concierge_credentialissuer_test.go +++ b/test/integration/concierge_credentialissuer_test.go @@ -64,9 +64,20 @@ func TestCredentialIssuer(t *testing.T) { // Verify the cluster strategy status based on what's expected of the test cluster's ability to share signing keys. actualStatusStrategies := actualConfigList.Items[0].Status.Strategies - require.Len(t, actualStatusStrategies, 1) - actualStatusStrategy := actualStatusStrategies[0] - require.Equal(t, configv1alpha1.KubeClusterSigningCertificateStrategyType, actualStatusStrategy.Type) + + // There should be two. One of type KubeClusterSigningCertificate and one of type ImpersonationProxy. + require.Len(t, actualStatusStrategies, 2) + + // The details of the ImpersonationProxy type is tested by a different integration test for the impersonator. + // Grab the KubeClusterSigningCertificate result so we can check it in detail below. + var actualStatusStrategy configv1alpha1.CredentialIssuerStrategy + for _, s := range actualStatusStrategies { + if s.Type == configv1alpha1.KubeClusterSigningCertificateStrategyType { + actualStatusStrategy = s + break + } + } + require.NotNil(t, actualStatusStrategy) if env.HasCapability(library.ClusterSigningKeyIsAvailable) { require.Equal(t, configv1alpha1.SuccessStrategyStatus, actualStatusStrategy.Status)