Repository: ambari Updated Branches: refs/heads/trunk b2c3daa89 -> 80c803b8c
AMBARI-16020 Hive Metastore install failed since mysql-server not installed. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/80c803b8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/80c803b8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/80c803b8 Branch: refs/heads/trunk Commit: 80c803b8caeb6787442f91abd3d75c3dfa3119c3 Parents: b2c3daa Author: Andrii Tkach <[email protected]> Authored: Thu Apr 21 20:28:38 2016 +0300 Committer: Andrii Tkach <[email protected]> Committed: Fri Apr 22 11:17:54 2016 +0300 ---------------------------------------------------------------------- .../app/controllers/wizard/step8_controller.js | 2 +- ambari-web/test/controllers/wizard/step8_test.js | 18 +++++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/80c803b8/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 ad53291..a5eb949 100644 --- a/ambari-web/app/controllers/wizard/step8_controller.js +++ b/ambari-web/app/controllers/wizard/step8_controller.js @@ -1292,7 +1292,7 @@ App.WizardStep8Controller = Em.Controller.extend(App.AddSecurityConfigs, App.wiz if (hiveService) { var hiveDb = this.get('content.serviceConfigProperties').findProperty('name', 'hive_database'); if (hiveDb.value == "New MySQL Database") { - this.registerHostsToComponent(masterHosts.filterProperty('component', 'HIVE_SERVER').mapProperty('hostName'), 'MYSQL_SERVER'); + this.registerHostsToComponent(masterHosts.filterProperty('component', 'HIVE_METASTORE').mapProperty('hostName'), 'MYSQL_SERVER'); } else if (hiveDb.value === "New PostgreSQL Database") { this.registerHostsToComponent(masterHosts.filterProperty('component', 'HIVE_SERVER').mapProperty('hostName'), 'POSTGRESQL_SERVER'); } http://git-wip-us.apache.org/repos/asf/ambari/blob/80c803b8/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 4974460..e93e001 100644 --- a/ambari-web/test/controllers/wizard/step8_test.js +++ b/ambari-web/test/controllers/wizard/step8_test.js @@ -1314,11 +1314,15 @@ describe('App.WizardStep8Controller', function () { }); var newDatabases = [ - {name: 'New MySQL Database', - component: 'MYSQL_SERVER' + { + name: 'New MySQL Database', + component: 'MYSQL_SERVER', + expectedHosts: ['h1'] }, - {name: 'New PostgreSQL Database', - component: 'POSTGRESQL_SERVER' + { + name: 'New PostgreSQL Database', + component: 'POSTGRESQL_SERVER', + expectedHosts: ['h2'] } ]; @@ -1332,7 +1336,7 @@ describe('App.WizardStep8Controller', function () { }, content: { masterComponentHosts: [ - {component: 'HIVE_SERVER', hostName: 'h1'}, + {component: 'HIVE_METASTORE', hostName: 'h1'}, {component: 'HIVE_SERVER', hostName: 'h2'} ], services: [ @@ -1349,8 +1353,8 @@ describe('App.WizardStep8Controller', function () { it('registerHostsToComponent is called once', function () { expect(installerStep8Controller.registerHostsToComponent.calledOnce).to.equal(true); }); - it('hosts are ["h1", "h2"]', function () { - expect(installerStep8Controller.registerHostsToComponent.args[0][0]).to.eql(['h1', 'h2']); + it('hosts are ' + db.expectedHosts, function () { + expect(installerStep8Controller.registerHostsToComponent.args[0][0]).to.eql(db.expectedHosts); }); it('component is ' + db.component, function () { expect(installerStep8Controller.registerHostsToComponent.args[0][1]).to.equal(db.component);
