NO-ISSUE Remove unnecessary mock controller from service config test
@@ -3,7 +3,6 @@ package controllers
import (
"context"
- "github.com/golang/mock/gomock"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
aiv1beta1 "github.com/openshift/assisted-service/internal/controller/api/v1beta1"
@@ -38,25 +37,18 @@ var _ = Describe("ensureAgentLocalAuthSecret", func() {
asc *aiv1beta1.AgentServiceConfig
ascr *AgentServiceConfigReconciler
ctx = context.Background()
- mockCtrl *gomock.Controller
privateKey = "test-private-key"
publicKey = "test-public-key"
- localAuthSecret *corev1.Secret
)
BeforeEach(func() {
- mockCtrl = gomock.NewController(GinkgoT())
asc = newDefaultAgentServiceConfig()
ascr = newTestReconciler(asc)
})
- AfterEach(func() {
- mockCtrl.Finish()
- })
-
Context("with an existing local auth secret", func() {
It("should not modify existing keys", func() {
- localAuthSecret = &corev1.Secret{
+ localAuthSecret := &corev1.Secret{
ObjectMeta: metav1.ObjectMeta{
Name: agentLocalAuthSecretName,
Namespace: testNamespace,
