@@ -36,6 +36,7 @@ import (
3636 "github.com/stretchr/testify/mock"
3737 "github.com/stretchr/testify/require"
3838 "github.com/stretchr/testify/suite"
39+ helmcli "helm.sh/helm/v3/pkg/cli"
3940 "k8s.io/cli-runtime/pkg/genericclioptions"
4041)
4142
@@ -93,6 +94,7 @@ func (s *AppPreflightTestSuite) TestGetAppPreflightsStatus() {
9394 appcontroller .WithStateMachine (stateMachine ),
9495 appcontroller .WithStore (mockStore ),
9596 appcontroller .WithReleaseData (integration .DefaultReleaseData ()),
97+ appcontroller .WithHelmClient (& helm.MockClient {}),
9698 )
9799 require .NoError (s .T (), err )
98100
@@ -191,6 +193,7 @@ func (s *AppPreflightTestSuite) TestGetAppPreflightsStatus() {
191193 appcontroller .WithStateMachine (strictStateMachine ),
192194 appcontroller .WithStore (mockStrictStore ),
193195 appcontroller .WithReleaseData (integration .DefaultReleaseData ()),
196+ appcontroller .WithHelmClient (& helm.MockClient {}),
194197 )
195198 require .NoError (t , err )
196199
@@ -294,6 +297,7 @@ func (s *AppPreflightTestSuite) TestPostRunAppPreflights() {
294297 appcontroller .WithStateMachine (stateMachine ),
295298 appcontroller .WithStore (mockStore ),
296299 appcontroller .WithReleaseData (integration .DefaultReleaseData ()),
300+ appcontroller .WithHelmClient (& helm.MockClient {}),
297301 )
298302 require .NoError (t , err )
299303
@@ -344,6 +348,7 @@ func (s *AppPreflightTestSuite) TestPostRunAppPreflights() {
344348 appcontroller .WithStateMachine (stateMachine ),
345349 appcontroller .WithStore (& store.MockStore {}),
346350 appcontroller .WithReleaseData (integration .DefaultReleaseData ()),
351+ appcontroller .WithHelmClient (& helm.MockClient {}),
347352 )
348353 require .NoError (t , err )
349354
@@ -381,6 +386,7 @@ func (s *AppPreflightTestSuite) TestPostRunAppPreflights() {
381386 appcontroller .WithStateMachine (stateMachine ),
382387 appcontroller .WithStore (& store.MockStore {}),
383388 appcontroller .WithReleaseData (integration .DefaultReleaseData ()),
389+ appcontroller .WithHelmClient (& helm.MockClient {}),
384390 )
385391 require .NoError (t , err )
386392
@@ -461,6 +467,7 @@ func TestAppPreflightSuite(t *testing.T) {
461467 api .WithLinuxUpgradeController (controller ),
462468 api .WithAuthController (auth .NewStaticAuthController ("TOKEN" )),
463469 api .WithLogger (logger .NewDiscardLogger ()), // Prevent permission errors from log file creation
470+ api .WithHelmClient (& helm.MockClient {}),
464471 )
465472 require .NoError (t , err )
466473 return apiInstance
@@ -485,6 +492,7 @@ func TestAppPreflightSuite(t *testing.T) {
485492 kubernetesupgrade .WithReleaseData (rd ),
486493 kubernetesupgrade .WithHelmClient (& helm.MockClient {}),
487494 kubernetesupgrade .WithAppController (appController ),
495+ kubernetesupgrade .WithKubernetesEnvSettings (helmcli .New ()),
488496 )
489497 require .NoError (t , err )
490498
@@ -502,6 +510,7 @@ func TestAppPreflightSuite(t *testing.T) {
502510 api .WithKubernetesUpgradeController (controller ),
503511 api .WithAuthController (auth .NewStaticAuthController ("TOKEN" )),
504512 api .WithLogger (logger .NewDiscardLogger ()),
513+ api .WithHelmClient (& helm.MockClient {}),
505514 )
506515 require .NoError (t , err )
507516 return apiInstance
0 commit comments