ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jai...@apache.org
Subject git commit: AMBARI-6091. Secure cluster: MapReduce2 service check fails. (jaimin)
Date Mon, 16 Jun 2014 20:59:34 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 975753e21 -> e0ea325b5


AMBARI-6091. Secure cluster: MapReduce2 service check fails. (jaimin)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e0ea325b
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e0ea325b
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e0ea325b

Branch: refs/heads/trunk
Commit: e0ea325b5d1f9b9c97552f08688be6b3392f8a82
Parents: 975753e
Author: Jaimin Jetly <jaimin@hortonworks.com>
Authored: Mon Jun 16 13:59:10 2014 -0700
Committer: Jaimin Jetly <jaimin@hortonworks.com>
Committed: Mon Jun 16 13:59:19 2014 -0700

----------------------------------------------------------------------
 ambari-web/app/assets/test/tests.js             |  1 +
 .../main/admin/security/add/step4.js            |  2 --
 ambari-web/app/data/HDP2/secure_mapping.js      |  8 ++---
 .../test/data/HDP2/secure_mapping_test.js       | 31 ++++++++++++++++++++
 4 files changed, 36 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/e0ea325b/ambari-web/app/assets/test/tests.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/test/tests.js b/ambari-web/app/assets/test/tests.js
index 711047b..79d606a 100644
--- a/ambari-web/app/assets/test/tests.js
+++ b/ambari-web/app/assets/test/tests.js
@@ -35,6 +35,7 @@ require('mappers');
 require('test/init_model_test');
 require('test/app_test');
 require('test/data/HDP2/site_properties_test');
+require('test/data/HDP2/secure_mapping_test');
 require('test/controllers/global/background_operations_test');
 require('test/controllers/global/cluster_controller_test');
 require('test/controllers/global/update_controller_test');

http://git-wip-us.apache.org/repos/asf/ambari/blob/e0ea325b/ambari-web/app/controllers/main/admin/security/add/step4.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/security/add/step4.js b/ambari-web/app/controllers/main/admin/security/add/step4.js
index 5706ac6..bbd1b86 100644
--- a/ambari-web/app/controllers/main/admin/security/add/step4.js
+++ b/ambari-web/app/controllers/main/admin/security/add/step4.js
@@ -246,8 +246,6 @@ App.MainAdminSecurityAddStep4Controller = App.MainAdminSecurityProgressControlle
    * @return {String|null}
    */
   getGlobConfigValue: function (templateName, expression) {
-    if (typeof expression !== 'string') return null;
-
     var express = expression.match(/<(.*?)>/g);
     var value = expression;
     if (Em.isNone(express)) return expression;

http://git-wip-us.apache.org/repos/asf/ambari/blob/e0ea325b/ambari-web/app/data/HDP2/secure_mapping.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/HDP2/secure_mapping.js b/ambari-web/app/data/HDP2/secure_mapping.js
index 38e3abe..a7c5695 100644
--- a/ambari-web/app/data/HDP2/secure_mapping.js
+++ b/ambari-web/app/data/HDP2/secure_mapping.js
@@ -201,8 +201,8 @@ module.exports = [
     "name": "yarn.timeline-service.enabled",
     "templateName": [],
     "foreignKey": null,
-    "value": false,
-    "nonSecureValue": false,
+    "value": "false",
+    "nonSecureValue": "false",
     "filename": "yarn-site.xml",
     "serviceName": "YARN"
   },
@@ -210,8 +210,8 @@ module.exports = [
     "name": "yarn.acl.enable",
     "templateName": [],
     "foreignKey": null,
-    "value": true,
-    "nonSecureValue": false,
+    "value": "true",
+    "nonSecureValue": "false",
     "filename": "yarn-site.xml",
     "serviceName": "YARN"
   },

http://git-wip-us.apache.org/repos/asf/ambari/blob/e0ea325b/ambari-web/test/data/HDP2/secure_mapping_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/data/HDP2/secure_mapping_test.js b/ambari-web/test/data/HDP2/secure_mapping_test.js
new file mode 100644
index 0000000..a08d0cb
--- /dev/null
+++ b/ambari-web/test/data/HDP2/secure_mapping_test.js
@@ -0,0 +1,31 @@
+/**
+ * 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');
+require('utils/helper');
+var mappedProperties = require('data/HDP2/secure_mapping');
+
+describe('hdp2SiteMapping', function () {
+
+  // All mapped properties should have value of string type
+  mappedProperties.forEach(function(mappedProperty){
+    it('Value of "' + mappedProperty.name  + '"' + ' should be string', function () {
+      expect(mappedProperty.value).to.be.a('string');
+    });
+  });
+});
\ No newline at end of file


Mime
View raw message