@@ -509,23 +509,15 @@ func (s *AppControllerTestSuite) TestInstallApp() {
509509 appConfigValues := types.AppConfigValues {
510510 "test-key" : types.AppConfigValue {Value : "test-value" },
511511 }
512- kotsConfigValues := kotsv1beta1.ConfigValues {
513- Spec : kotsv1beta1.ConfigValuesSpec {
514- Values : map [string ]kotsv1beta1.ConfigValue {
515- "test-key" : {Value : "test-value" },
516- },
517- },
518- }
519512 mock .InOrder (
520513 acm .On ("GetConfigValues" ).Return (appConfigValues , nil ),
521- acm .On ("GetKotsadmConfigValues" ).Return (kotsConfigValues , nil ),
522514 arm .On ("ExtractInstallableHelmCharts" , mock .Anything , appConfigValues , mock .AnythingOfType ("*v1beta1.ProxySpec" ), mock .AnythingOfType ("*types.RegistrySettings" )).Return (expectedCharts , nil ),
523515
524516 store .AppInstallMockStore .On ("SetStatus" , mock .MatchedBy (func (status types.Status ) bool {
525517 return status .State == types .StateRunning
526518 })).Return (nil ),
527519
528- aim .On ("Install" , mock .Anything , expectedCharts , kotsConfigValues ).Return (nil ),
520+ aim .On ("Install" , mock .Anything , expectedCharts , mock . AnythingOfType ( "*types.RegistrySettings" ), mock . AnythingOfType ( "string" ) ).Return (nil ),
529521
530522 store .AppInstallMockStore .On ("SetStatus" , mock .MatchedBy (func (status types.Status ) bool {
531523 return status .State == types .StateSucceeded
@@ -542,23 +534,15 @@ func (s *AppControllerTestSuite) TestInstallApp() {
542534 appConfigValues := types.AppConfigValues {
543535 "test-key" : types.AppConfigValue {Value : "test-value" },
544536 }
545- kotsConfigValues := kotsv1beta1.ConfigValues {
546- Spec : kotsv1beta1.ConfigValuesSpec {
547- Values : map [string ]kotsv1beta1.ConfigValue {
548- "test-key" : {Value : "test-value" },
549- },
550- },
551- }
552537 mock .InOrder (
553538 acm .On ("GetConfigValues" ).Return (appConfigValues , nil ),
554- acm .On ("GetKotsadmConfigValues" ).Return (kotsConfigValues , nil ),
555539 arm .On ("ExtractInstallableHelmCharts" , mock .Anything , appConfigValues , mock .AnythingOfType ("*v1beta1.ProxySpec" ), mock .AnythingOfType ("*types.RegistrySettings" )).Return ([]types.InstallableHelmChart {}, nil ),
556540
557541 store .AppInstallMockStore .On ("SetStatus" , mock .MatchedBy (func (status types.Status ) bool {
558542 return status .State == types .StateRunning
559543 })).Return (nil ),
560544
561- aim .On ("Install" , mock .Anything , []types.InstallableHelmChart {}, kotsConfigValues ).Return (nil ),
545+ aim .On ("Install" , mock .Anything , []types.InstallableHelmChart {}, mock . AnythingOfType ( "*types.RegistrySettings" ), mock . AnythingOfType ( "string" ) ).Return (nil ),
562546
563547 store .AppInstallMockStore .On ("SetStatus" , mock .MatchedBy (func (status types.Status ) bool {
564548 return status .State == types .StateSucceeded
@@ -575,23 +559,15 @@ func (s *AppControllerTestSuite) TestInstallApp() {
575559 appConfigValues := types.AppConfigValues {
576560 "test-key" : types.AppConfigValue {Value : "test-value" },
577561 }
578- kotsConfigValues := kotsv1beta1.ConfigValues {
579- Spec : kotsv1beta1.ConfigValuesSpec {
580- Values : map [string ]kotsv1beta1.ConfigValue {
581- "test-key" : {Value : "test-value" },
582- },
583- },
584- }
585562 mock .InOrder (
586563 acm .On ("GetConfigValues" ).Return (appConfigValues , nil ),
587- acm .On ("GetKotsadmConfigValues" ).Return (kotsConfigValues , nil ),
588564 arm .On ("ExtractInstallableHelmCharts" , mock .Anything , appConfigValues , mock .AnythingOfType ("*v1beta1.ProxySpec" ), mock .AnythingOfType ("*types.RegistrySettings" )).Return ([]types.InstallableHelmChart {}, nil ),
589565
590566 store .AppInstallMockStore .On ("SetStatus" , mock .MatchedBy (func (status types.Status ) bool {
591567 return status .State == types .StateRunning
592568 })).Return (nil ),
593569
594- aim .On ("Install" , mock .Anything , []types.InstallableHelmChart {}, kotsConfigValues ).Return (errors .New ("install error" )),
570+ aim .On ("Install" , mock .Anything , []types.InstallableHelmChart {}, mock . AnythingOfType ( "*types.RegistrySettings" ), mock . AnythingOfType ( "string" ) ).Return (errors .New ("install error" )),
595571
596572 store .AppInstallMockStore .On ("SetStatus" , mock .MatchedBy (func (status types.Status ) bool {
597573 return status .State == types .StateFailed && strings .Contains (status .Description , "install error" )
@@ -620,13 +596,6 @@ func (s *AppControllerTestSuite) TestInstallApp() {
620596 appConfigValues := types.AppConfigValues {
621597 "test-key" : types.AppConfigValue {Value : "test-value" },
622598 }
623- kotsConfigValues := kotsv1beta1.ConfigValues {
624- Spec : kotsv1beta1.ConfigValuesSpec {
625- Values : map [string ]kotsv1beta1.ConfigValue {
626- "test-key" : {Value : "test-value" },
627- },
628- },
629- }
630599 mock .InOrder (
631600 // Mock GetAppPreflightOutput to return non-strict failures (can be bypassed)
632601 apm .On ("GetAppPreflightOutput" , mock .Anything ).Return (& types.PreflightsOutput {
@@ -640,14 +609,13 @@ func (s *AppControllerTestSuite) TestInstallApp() {
640609 }, nil ),
641610
642611 acm .On ("GetConfigValues" ).Return (appConfigValues , nil ),
643- acm .On ("GetKotsadmConfigValues" ).Return (kotsConfigValues , nil ),
644612 arm .On ("ExtractInstallableHelmCharts" , mock .Anything , appConfigValues , mock .AnythingOfType ("*v1beta1.ProxySpec" ), mock .AnythingOfType ("*types.RegistrySettings" )).Return ([]types.InstallableHelmChart {}, nil ),
645613
646614 store .AppInstallMockStore .On ("SetStatus" , mock .MatchedBy (func (status types.Status ) bool {
647615 return status .State == types .StateRunning
648616 })).Return (nil ),
649617
650- aim .On ("Install" , mock .Anything , []types.InstallableHelmChart {}, kotsConfigValues ).Return (nil ),
618+ aim .On ("Install" , mock .Anything , []types.InstallableHelmChart {}, mock . AnythingOfType ( "*types.RegistrySettings" ), mock . AnythingOfType ( "string" ) ).Return (nil ),
651619
652620 store .AppInstallMockStore .On ("SetStatus" , mock .MatchedBy (func (status types.Status ) bool {
653621 return status .State == types .StateSucceeded
0 commit comments