From b21b43c654a36cedf89cc240502367724a53d5b2 Mon Sep 17 00:00:00 2001 From: Andrew Keesler Date: Thu, 24 Sep 2020 17:56:55 -0400 Subject: [PATCH] Fix expected CIC status message on non-hosted control planes --- internal/controller/kubecertagent/creater.go | 2 +- internal/controller/kubecertagent/creater_test.go | 4 ++-- test/integration/credentialissuerconfig_test.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/controller/kubecertagent/creater.go b/internal/controller/kubecertagent/creater.go index 229848ec..5d3200b3 100644 --- a/internal/controller/kubecertagent/creater.go +++ b/internal/controller/kubecertagent/creater.go @@ -97,7 +97,7 @@ func (c *createrController) Sync(ctx controllerlib.Context) error { *c.credentialIssuerConfigLocationConfig, c.clock, c.pinnipedAPIClient, - constable.Error("Controller manager pod(s) could not be found"), + constable.Error("did not find kube-controller-manager pod(s)"), ) } diff --git a/internal/controller/kubecertagent/creater_test.go b/internal/controller/kubecertagent/creater_test.go index 2953b1f4..58d6c4bd 100644 --- a/internal/controller/kubecertagent/creater_test.go +++ b/internal/controller/kubecertagent/creater_test.go @@ -431,7 +431,7 @@ func TestCreaterControllerSync(t *testing.T) { Type: configv1alpha1.KubeClusterSigningCertificateStrategyType, Status: configv1alpha1.ErrorStrategyStatus, Reason: configv1alpha1.CouldNotFetchKeyStrategyReason, - Message: "Controller manager pod(s) could not be found", + Message: "did not find kube-controller-manager pod(s)", LastUpdateTime: metav1.NewTime(frozenNow), }, } @@ -509,7 +509,7 @@ func TestCreaterControllerSync(t *testing.T) { Type: configv1alpha1.KubeClusterSigningCertificateStrategyType, Status: configv1alpha1.ErrorStrategyStatus, Reason: configv1alpha1.CouldNotFetchKeyStrategyReason, - Message: "Controller manager pod(s) could not be found", + Message: "did not find kube-controller-manager pod(s)", LastUpdateTime: metav1.NewTime(frozenNow), }, }, diff --git a/test/integration/credentialissuerconfig_test.go b/test/integration/credentialissuerconfig_test.go index f07dd81a..6a52d93b 100644 --- a/test/integration/credentialissuerconfig_test.go +++ b/test/integration/credentialissuerconfig_test.go @@ -59,7 +59,7 @@ func TestCredentialIssuerConfig(t *testing.T) { } else { require.Equal(t, configv1alpha1.ErrorStrategyStatus, actualStatusStrategy.Status) require.Equal(t, configv1alpha1.CouldNotFetchKeyStrategyReason, actualStatusStrategy.Reason) - require.Contains(t, actualStatusStrategy.Message, "did not find kube-controller-manager pod") + require.Contains(t, actualStatusStrategy.Message, "did not find kube-controller-manager pod(s)") // For now, don't verify the kube config info because its not available on GKE. We'll need to address // this somehow once we starting supporting those cluster types. // Require `nil` to remind us to address this later for other types of clusters where it is available.