diff --git a/test/functional/base_test.go b/test/functional/base_test.go index dde6d8d39..9294a5e76 100644 --- a/test/functional/base_test.go +++ b/test/functional/base_test.go @@ -643,15 +643,6 @@ func GetDefaultNovaNoVNCProxySpec(cell CellNames) map[string]interface{} { } } -func UpdateSecret(secretName types.NamespacedName, key string, newValue []byte) { - Eventually(func(g Gomega) { - secret := th.GetSecret(secretName) - secret.Data[key] = newValue - g.Expect(k8sClient.Update(ctx, &secret)).Should(Succeed()) - }, timeout, interval).Should(Succeed()) - logger.Info("Secret updated", "secret", secretName, "key", key) -} - func CreateCellInternalSecret(cell CellNames) *corev1.Secret { return th.CreateSecret( cell.InternalCellSecretName, diff --git a/test/functional/nova_reconfiguration_test.go b/test/functional/nova_reconfiguration_test.go index 2d6773b86..c97b0e630 100644 --- a/test/functional/nova_reconfiguration_test.go +++ b/test/functional/nova_reconfiguration_test.go @@ -438,7 +438,7 @@ var _ = Describe("Nova reconfiguration", func() { When("the service password in the osp secret is changed", func() { It("reconfigures every nova service", func() { secretName := types.NamespacedName{Namespace: novaNames.NovaName.Namespace, Name: SecretName} - UpdateSecret(secretName, "NovaPassword", []byte("new-service-password")) + th.UpdateSecret(secretName, "NovaPassword", []byte("new-service-password")) // Expect that every service config is updated with the new service password for _, cmName := range []types.NamespacedName{ @@ -486,7 +486,7 @@ var _ = Describe("Nova reconfiguration", func() { } secretName := types.NamespacedName{Namespace: novaNames.NovaName.Namespace, Name: SecretName} - UpdateSecret(secretName, "NovaPassword", []byte("new-service-password")) + th.UpdateSecret(secretName, "NovaPassword", []byte("new-service-password")) // Assert that the config hash is updated in each stateful set for i, ss := range ssNames { @@ -576,7 +576,7 @@ var _ = Describe("Nova reconfiguration", func() { Expect(originalComputeHash).NotTo(BeEmpty()) secretName := types.NamespacedName{Namespace: novaNames.NovaName.Namespace, Name: SecretName} - UpdateSecret(secretName, "MetadataSecret", []byte("new-metadata-secret")) + th.UpdateSecret(secretName, "MetadataSecret", []byte("new-metadata-secret")) Eventually(func(g Gomega) { configDataMap := th.GetSecret(novaNames.MetadataConfigDataName)