AMBARI-18766. Add Service failed when none of the host components report version. (jaimin)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/94573ad7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/94573ad7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/94573ad7 Branch: refs/heads/branch-feature-AMBARI-18634 Commit: 94573ad709ffe62a3df2a2198edc2984eedd8442 Parents: 47b926f Author: Jaimin Jetly <[email protected]> Authored: Wed Nov 2 20:36:03 2016 -0700 Committer: Jaimin Jetly <[email protected]> Committed: Wed Nov 2 20:41:21 2016 -0700 ---------------------------------------------------------------------- ambari-web/app/controllers/wizard/step8_controller.js | 2 +- ambari-web/test/controllers/wizard/step8_test.js | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/94573ad7/ambari-web/app/controllers/wizard/step8_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/wizard/step8_controller.js b/ambari-web/app/controllers/wizard/step8_controller.js index 644885b..237e2d8 100644 --- a/ambari-web/app/controllers/wizard/step8_controller.js +++ b/ambari-web/app/controllers/wizard/step8_controller.js @@ -329,7 +329,7 @@ App.WizardStep8Controller = Em.Controller.extend(App.AddSecurityConfigs, App.wiz */ loadRepoInfo: function () { - var currentRepoVersion = App.StackVersion.find().findProperty('state', 'CURRENT').get('repositoryVersion.repositoryVersion'); + var currentRepoVersion = App.get('currentStackVersionNumber'); var stackName = App.get('currentStackName'); return App.ajax.send({ http://git-wip-us.apache.org/repos/asf/ambari/blob/94573ad7/ambari-web/test/controllers/wizard/step8_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/controllers/wizard/step8_test.js b/ambari-web/test/controllers/wizard/step8_test.js index 217900f..3abe2cb 100644 --- a/ambari-web/test/controllers/wizard/step8_test.js +++ b/ambari-web/test/controllers/wizard/step8_test.js @@ -637,17 +637,13 @@ describe('App.WizardStep8Controller', function () { describe('#loadRepoInfo', function() { beforeEach(function () { - sinon.stub(App, 'get').withArgs('currentStackName').returns('HDP'); - sinon.stub(App.StackVersion, 'find', function() { - return [ - Em.Object.create({state: 'CURRENT', repositoryVersion: {repositoryVersion: '2.3.0.0-2208'}}) - ]; - }); + var stubForGet = sinon.stub(App, 'get'); + stubForGet.withArgs('currentStackName').returns('HDP'); + stubForGet.withArgs('currentStackVersionNumber').returns('2.3.0.0-2208'); }); afterEach(function () { App.get.restore(); - App.StackVersion.find.restore(); }); it('should use current StackVersion', function() { installerStep8Controller.loadRepoInfo();
