You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jg...@apache.org on 2018/05/29 18:34:02 UTC

[ambari] branch branch-feature-AMBARI-14714 updated: Remove references to deleted unit test files and fix broken tests.

This is an automated email from the ASF dual-hosted git repository.

jgolieb pushed a commit to branch branch-feature-AMBARI-14714
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-feature-AMBARI-14714 by this push:
     new dedc8c4  Remove references to deleted unit test files and fix broken tests.
dedc8c4 is described below

commit dedc8c424f0b9cbed5d4c451dc6b01f2b2b3d35e
Author: Jason Golieb <jg...@hortonworks.com>
AuthorDate: Fri May 25 16:40:16 2018 -0400

    Remove references to deleted unit test files and fix broken tests.
---
 ambari-web/app/assets/test/tests.js                |  12 ---
 ambari-web/app/templates/wizard/step4.hbs          | 115 ---------------------
 .../step4/step4_ranger_requirements_popup.hbs      |  22 ----
 ambari-web/app/views/wizard/step4_view.js          |  31 ------
 ambari-web/test/controllers/wizard_test.js         |   3 +-
 .../host_component_recommendation_mixin_test.js    |  52 +++++-----
 .../views/main/host/stack_versions_view_test.js    |  21 ----
 7 files changed, 30 insertions(+), 226 deletions(-)

diff --git a/ambari-web/app/assets/test/tests.js b/ambari-web/app/assets/test/tests.js
index a44138e..2c151ee 100644
--- a/ambari-web/app/assets/test/tests.js
+++ b/ambari-web/app/assets/test/tests.js
@@ -66,7 +66,6 @@ var files = [
   'test/controllers/main/admin/kerberos/step7_controller_test',
   'test/controllers/main/admin/kerberos/step8_controller_test',
   'test/controllers/main/admin/service_auto_start_test',
-  'test/controllers/main/admin/stack_and_upgrade_controller_test',
   'test/controllers/main/admin/stack_upgrade_history_controller_test',
   'test/controllers/main/admin/serviceAccounts_controller_test',
   'test/controllers/main/admin/highAvailability_controller_test',
@@ -149,10 +148,8 @@ var files = [
   'test/controllers/wizard/verifyProducts_test',
   'test/controllers/wizard/wizardStep_test',
   'test/controllers/wizard/step0_test',
-  'test/controllers/wizard/step1_test',
   'test/controllers/wizard/step2_test',
   'test/controllers/wizard/step3_test',
-  'test/controllers/wizard/step4_test',
   'test/controllers/wizard/step5_test',
   'test/controllers/wizard/step6_test',
   'test/controllers/wizard/step7_test',
@@ -187,7 +184,6 @@ var files = [
   'test/mappers/socket/host_state_mapper_test',
   'test/mappers/socket/alert_definitions_mapper_adapter_test',
   'test/mappers/socket/alert_groups_mapper_adapter_test',
-  'test/mappers/socket/upgrade_state_mapper_test',
   'test/mixins/common/configs/enhanced_configs_test',
   'test/mixins/common/configs/config_recommendations_test',
   'test/mixins/common/configs/config_recommendation_parser_test',
@@ -306,16 +302,10 @@ var files = [
   'test/views/main/alerts/add_alert_definition/step1_view_test',
   'test/views/main/alerts/add_alert_definition/step3_view_test',
   'test/views/main/alerts/manage_alert_groups/select_definitions_popup_body_view_test',
-  'test/views/main/admin/stack_upgrade/upgrade_version_box_view_test',
-  'test/views/main/admin/stack_upgrade/upgrade_version_column_view_test',
   'test/views/main/admin/stack_upgrade/upgrade_group_view_test',
   'test/views/main/admin/stack_upgrade/upgrade_task_view_test',
-  'test/views/main/admin/stack_upgrade/upgrade_wizard_view_test',
   'test/views/main/admin/stack_upgrade/upgrade_history_view_test',
   'test/views/main/admin/stack_upgrade/upgrade_history_details_view_test',
-  'test/views/main/admin/stack_upgrade/version_view_test',
-  'test/views/main/admin/stack_upgrade/services_view_test',
-  'test/views/main/admin/stack_upgrade/menu_view_test',
   'test/views/main/admin/stack_upgrade/failed_hosts_modal_view_test',
   'test/views/main/admin/service_auto_start_test',
   'test/views/main/dashboard/config_history_view_test',
@@ -413,10 +403,8 @@ var files = [
   'test/views/wizard/customMpackRepos_view_test',
   'test/views/wizard/customProductRepos_view_test',
   'test/views/wizard/step0_view_test',
-  'test/views/wizard/step1_view_test',
   'test/views/wizard/step2_view_test',
   'test/views/wizard/step3_view_test',
-  'test/views/wizard/step4_view_test',
   'test/views/wizard/step5_view_test',
   'test/views/wizard/step6_view_test',
   'test/views/wizard/step7_view_test',
diff --git a/ambari-web/app/templates/wizard/step4.hbs b/ambari-web/app/templates/wizard/step4.hbs
deleted file mode 100644
index dea5aa6..0000000
--- a/ambari-web/app/templates/wizard/step4.hbs
+++ /dev/null
@@ -1,115 +0,0 @@
-{{!
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License.  You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-}}
-
-<div id="step4" class="wizard-content col-md-9">
-  <h4 class="step-header">{{t installer.step4.headerFS}}</h4>
-  <p class="step-description">{{t installer.step4.bodyFS}}</p>
-  <div class="panel panel-default">
-    <div class="panel-body">
-      <table class="table table-hover">
-        <thead>
-        <tr>
-          <th class="checkbox-row"></th>
-          <th {{QAAttr "service-name-header"}} class="col-md-3">{{t common.service}}</th>
-          <th {{QAAttr "service-version-header"}} id="service-version">{{t common.version}}</th>
-          <th {{QAAttr "service-description-header"}} id="service-description">{{t common.description}}</th>
-        </tr>
-        </thead>
-        <tbody>
-        {{#each service in controller.fileSystems}}
-          {{#unless service.isHiddenOnSelectServicePage}}
-            <tr {{QAAttr "service-row"}} {{bindAttr class="service.isSelected:active service.isSelected:service-selected"}} {{action toggleCheckBox service target="view"}} >
-              <td class="checkbox-cell">
-                <div class="checkbox">
-                  {{view App.CheckboxView checkboxClassNamesBinding="service.serviceName" data-qa="toggle-service"
-                  disabledBinding="service.isDisabled"
-                  checkedBinding="service.isSelected"
-                  }}
-                </div>
-              </td>
-              <td {{QAAttr "service-name"}}>{{service.displayNameOnSelectServicePage}}</td>
-              <td {{QAAttr "service-version"}}>{{service.serviceVersionDisplay}}</td>
-              <td {{QAAttr "service-description"}}>{{{service.comments}}}</td>
-            </tr>
-          {{/unless}}
-        {{/each}}
-        </tbody>
-      </table>
-    </div>
-  </div>
-
-  <h4 class="step-title">{{t installer.step4.header}}</h4>
-  <p class="step-description">{{t installer.step4.body}}</p>
-
-  <div class="panel panel-default">
-    <div class="panel-body">
-      <table class="table table-hover">
-        <thead>
-        <tr>
-          <th>
-            {{view App.CheckboxView data-qa="toggle-all" disabledBinding="isInstalled" checkedBinding="isAllChecked"}}
-          </th>
-          <th {{QAAttr "service-name-header"}} class="col-md-3">{{t common.service}}</th>
-          <th {{QAAttr "service-version-header"}} id="service-version">{{t common.version}}</th>
-          <th {{QAAttr "service-description-header"}} id="service-description">{{t common.description}}</th>
-        </tr>
-        </thead>
-        <tbody>
-        {{#each service in controller}}
-          {{#unless service.isHiddenOnSelectServicePage}}
-            {{#unless service.isDFS}}
-              <tr {{QAAttr "service-row"}} {{bindAttr class="service.isSelected:active service.isSelected:service-selected"}} {{action toggleCheckBox service target="view"}}>
-                <td class="checkbox-cell">
-                  <div class="checkbox">
-                    {{view App.CheckboxView checkboxClassNamesBinding="service.serviceName" data-qa="toggle-service"
-                    disabledBinding="service.isDisabled"
-                    checkedBinding="service.isSelected" }}
-                  </div>
-                </td>
-                <td {{QAAttr "service-name"}}>{{service.displayNameOnSelectServicePage}}</td>
-                <td {{QAAttr "service-version"}}>{{service.serviceVersionDisplay}}</td>
-                <td {{QAAttr "service-description"}}>{{{service.comments}}}</td>
-              </tr>
-            {{/unless}}
-          {{/unless}}
-        {{/each}}
-        </tbody>
-      </table>
-    </div>
-  </div>
-</div>
-
-
-<div class="wizard-footer col-md-12">
-  <div class="btn-area">
-    {{#unless view.parentView.controller.hideBackButton}}
-      <button type="button" {{QAAttr "wizard-back"}} class="btn btn-default pull-left installer-back-btn" {{bindAttr disabled="App.router.btnClickInProgress"}} {{action back}}>
-        &larr; {{t common.back}}
-        {{#if App.router.backBtnClickInProgress}}
-          {{view App.SpinnerView tagName="span" classNames="service-button-spinner"}}
-        {{/if}}
-      </button>
-    {{/unless}}
-    <button type="button" {{QAAttr "wizard-next"}} class="btn btn-success pull-right" {{bindAttr disabled="isSubmitDisabled"}} {{action submit target="controller"}}>
-      {{#if App.router.nextBtnClickInProgress}}
-        {{view App.SpinnerView tagName="span" classNames="service-button-spinner"}}
-      {{/if}}
-      {{t common.next}} &rarr;
-    </button>
-  </div>
-</div>
diff --git a/ambari-web/app/templates/wizard/step4/step4_ranger_requirements_popup.hbs b/ambari-web/app/templates/wizard/step4/step4_ranger_requirements_popup.hbs
deleted file mode 100644
index 9726556..0000000
--- a/ambari-web/app/templates/wizard/step4/step4_ranger_requirements_popup.hbs
+++ /dev/null
@@ -1,22 +0,0 @@
-{{!
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License.  You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-}}
-
-{{t installer.step4.rangerRequirements.popup.body.requirements}}
-<div class="checkbox">
-  {{view App.CheckboxView data-qa="ranger-requirements-confirmation" checkedBinding="isChecked" labelTranslate="installer.step4.rangerRequirements.popup.body.confirmation"}}
-</div>
diff --git a/ambari-web/app/views/wizard/step4_view.js b/ambari-web/app/views/wizard/step4_view.js
deleted file mode 100644
index 928d46c..0000000
--- a/ambari-web/app/views/wizard/step4_view.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-var App = require('app');
-
-App.WizardStep4View = Em.View.extend({
-
-  templateName: require('templates/wizard/step4'),
-
-  toggleCheckBox: function(event) {
-    if (event.context.get('isDisabled')) { return; }
-    var isSelected = event.context.get('isSelected');
-    event.context.set('isSelected', !isSelected);
-  }
-});
diff --git a/ambari-web/test/controllers/wizard_test.js b/ambari-web/test/controllers/wizard_test.js
index 2c24e61..0f1896c 100644
--- a/ambari-web/test/controllers/wizard_test.js
+++ b/ambari-web/test/controllers/wizard_test.js
@@ -1573,7 +1573,7 @@ describe('App.WizardController', function () {
     });
   });
 
-  describe('#loadConfigThemes', function() {
+  describe('#loadConfigThemes', function () {
     beforeEach(function () {
       sinon.stub(wizardController, 'loadConfigThemeForServices').returns({
         always: Em.clb
@@ -1589,6 +1589,7 @@ describe('App.WizardController', function () {
         })
       ]));
       this.stub = sinon.stub(App, 'get');
+      wizardController.set('content.selectedMpacks', []);
     });
     afterEach(function () {
       App.get.restore();
diff --git a/ambari-web/test/mixins/common/hosts/host_component_recommendation_mixin_test.js b/ambari-web/test/mixins/common/hosts/host_component_recommendation_mixin_test.js
index 15bddd0..13db571 100644
--- a/ambari-web/test/mixins/common/hosts/host_component_recommendation_mixin_test.js
+++ b/ambari-web/test/mixins/common/hosts/host_component_recommendation_mixin_test.js
@@ -109,9 +109,9 @@ describe('App.HostComponentRecommendationMixin', function() {
   describe('#loadComponentsRecommedationsFromServer', function() {
     it('default request options checking', function() {
       mixedObject.loadComponentsRecommendationsFromServer('someData');
-      var args = helpers.findAjaxRequest('name', 'wizard.loadrecommendations');
+      var args = helpers.findAjaxRequest('name', 'config.recommendations');
       expect(args[0]).to.be.eql({
-        name: 'wizard.loadrecommendations',
+        name: 'config.recommendations',
         sender: mixedObject,
         data: 'someData',
         success: 'loadRecommendationsSuccessCallback',
@@ -136,22 +136,24 @@ describe('App.HostComponentRecommendationMixin', function() {
           blueprint: null
         },
         e: {
-          recommend: 'host_groups',
-          stackVersionUrl: '/stack/url',
-          hosts: ['h1'],
-          services: ['s1'],
-          recommendations: {
-            blueprint: {
-              host_groups: [
-                {name: 'host-group-1',components: [{name: 'c1'}]}
-              ]
-            },
-            blueprint_cluster_binding: {
-              host_groups: [
-                {name: 'host-group-1', hosts: [{fqdn: 'h1'}]}
-              ]
+          dataToSend: {
+            recommend: 'host_groups',
+            hosts: ['h1'],
+            services: ['s1'],
+            recommendations: {
+              blueprint: {
+                host_groups: [
+                  { name: 'host-group-1', components: [{ name: 'c1' }] }
+                ]
+              },
+              blueprint_cluster_binding: {
+                host_groups: [
+                  { name: 'host-group-1', hosts: [{ fqdn: 'h1' }] }
+                ]
+              }
             }
-          }
+          },
+          stackVersionUrl: '/stack/url'
         },
         m: 'when blueprint not passed it should be generated from components list'
       },
@@ -163,13 +165,15 @@ describe('App.HostComponentRecommendationMixin', function() {
           blueprint: { blueprint: {}}
         },
         e: {
-          recommend: 'host_groups',
-          stackVersionUrl: '/stack/url',
-          hosts: ['h1'],
-          services: ['s1'],
-          recommendations: {
-            blueprint: {}
-          }
+          dataToSend: {
+            recommend: 'host_groups',
+            hosts: ['h1'],
+            services: ['s1'],
+            recommendations: {
+              blueprint: {}
+            }
+          },
+          stackVersionUrl: '/stack/url'
         },
         m: 'when blueprint passed it should be used instead of generated blueprint'
       }
diff --git a/ambari-web/test/views/main/host/stack_versions_view_test.js b/ambari-web/test/views/main/host/stack_versions_view_test.js
index c92c404..5160bc9 100644
--- a/ambari-web/test/views/main/host/stack_versions_view_test.js
+++ b/ambari-web/test/views/main/host/stack_versions_view_test.js
@@ -44,27 +44,6 @@ describe('App.MainHostStackVersionsView', function() {
     });
   });
 
-  describe("#showInstallProgress()", function () {
-    var mock = {
-      showProgressPopup: Em.K
-    };
-
-    beforeEach(function() {
-      sinon.stub(App.router, 'get').returns(mock);
-      sinon.stub(mock, 'showProgressPopup');
-    });
-
-    afterEach(function() {
-      App.router.get.restore();
-      mock.showProgressPopup.restore();
-    });
-
-    it("showProgressPopup should be called", function() {
-      view.showInstallProgress({context: {}});
-      expect(mock.showProgressPopup.calledWith({})).to.be.true;
-    });
-  });
-
   describe("#outOfSyncInfo", function () {
     var outOfSyncInfo;
 

-- 
To stop receiving notification emails like this one, please contact
jgolieb@apache.org.