diff --git a/operators/constellation-node-operator/controllers/nodeversion_controller_test.go b/operators/constellation-node-operator/controllers/nodeversion_controller_test.go index e32b99af3d..383e8593b5 100644 --- a/operators/constellation-node-operator/controllers/nodeversion_controller_test.go +++ b/operators/constellation-node-operator/controllers/nodeversion_controller_test.go @@ -891,3 +891,11 @@ func (*unimplementedNodeReplacer) CreateNode(_ context.Context, _ string) (nodeN func (*unimplementedNodeReplacer) DeleteNode(_ context.Context, _ string) error { panic("unimplemented") } + +type stubEtcdRemover struct { + deleteErr error +} + +func (r *stubEtcdRemover) RemoveEtcdMemberFromCluster(_ context.Context, _ string) error { + return r.deleteErr +} diff --git a/operators/constellation-node-operator/controllers/suite_test.go b/operators/constellation-node-operator/controllers/suite_test.go index dd2df34078..7b4e232181 100644 --- a/operators/constellation-node-operator/controllers/suite_test.go +++ b/operators/constellation-node-operator/controllers/suite_test.go @@ -123,6 +123,7 @@ var _ = BeforeSuite(func() { err = (&NodeVersionReconciler{ kubernetesServerVersionGetter: fakes.k8sVerGetter, nodeReplacer: fakes.nodeReplacer, + etcdRemover: fakes.etcdRemover, Client: k8sManager.GetClient(), Scheme: k8sManager.GetScheme(), }).SetupWithManager(k8sManager) @@ -147,6 +148,7 @@ type fakeCollection struct { nodeStateGetter *stubNodeStateGetter nodeReplacer *stubNodeReplacer k8sVerGetter *stubKubernetesServerVersionGetter + etcdRemover *stubEtcdRemover clock *testclock.FakeClock } @@ -162,6 +164,7 @@ func newFakes() fakeCollection { nodeStateGetter: &stubNodeStateGetter{}, nodeReplacer: &stubNodeReplacer{}, k8sVerGetter: &stubKubernetesServerVersionGetter{}, + etcdRemover: &stubEtcdRemover{}, clock: testclock.NewFakeClock(time.Now()), } }