فهرست منبع

AMBARI-9679. Customization of user account for running Ambari Agent doesn't work (alexantonenko)

Alex Antonenko 10 سال پیش
والد
کامیت
86d8bbc440
2فایلهای تغییر یافته به همراه7 افزوده شده و 7 حذف شده
  1. 1 1
      ambari-web/app/controllers/wizard/step3_controller.js
  2. 6 6
      ambari-web/test/controllers/wizard/step3_test.js

+ 1 - 1
ambari-web/app/controllers/wizard/step3_controller.js

@@ -217,7 +217,7 @@ App.WizardStep3Controller = Em.Controller.extend({
         'sshKey': this.get('content.installOptions.sshKey'),
         'hosts': Em.keys(this.get('content.hosts')),
         'user': this.get('content.installOptions.sshUser'),
-        'userRunAs': App.get('supports.customizeAgentUserAccount') ? this.get('agentUser') : 'root'
+        'userRunAs': App.get('supports.customizeAgentUserAccount') ? this.get('content.installOptions.agentUser') : 'root'
     });
     App.router.get(this.get('content.controllerName')).launchBootstrap(bootStrapData, function (requestId) {
       if (requestId == '0') {

+ 6 - 6
ambari-web/test/controllers/wizard/step3_test.js

@@ -557,11 +557,11 @@ describe('App.WizardStep3Controller', function () {
           content: {
             installOptions: {
               sshKey: 'key',
-              sshUser: 'root'
+              sshUser: 'root',
+              agentUser: 'user'
             },
             hosts: { "host0": { "name": "host0" }, "host1": { "name": "host1" } }
-          },
-          agentUser: 'user'
+          }
         });
         sinon.stub(App, 'get').withArgs('supports.customizeAgentUserAccount').returns(item.customizeAgentUserAccount);
         controller.setupBootStrap();
@@ -1977,12 +1977,12 @@ describe('App.WizardStep3Controller', function () {
         content: {
           installOptions: {
             sshKey: 'key',
-            sshUser: 'root'
+            sshUser: 'root',
+            agentUser: 'user'
           },
           hosts: { "host0": { "name": "host0" }, "host1": { "name": "host1" } },
           controllerName: 'installerController'
-        },
-        agentUser: 'user'
+        }
       });
 
     beforeEach(function () {