Return-Path: X-Original-To: apmail-ambari-commits-archive@www.apache.org Delivered-To: apmail-ambari-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8C02F118F7 for ; Mon, 16 Jun 2014 20:59:34 +0000 (UTC) Received: (qmail 23487 invoked by uid 500); 16 Jun 2014 20:59:34 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 23453 invoked by uid 500); 16 Jun 2014 20:59:34 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 23444 invoked by uid 99); 16 Jun 2014 20:59:34 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Jun 2014 20:59:34 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 143FE9411A0; Mon, 16 Jun 2014 20:59:34 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jaimin@apache.org To: commits@ambari.apache.org Message-Id: <6fe76873e19d46a09858d62f16943bcc@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: AMBARI-6091. Secure cluster: MapReduce2 service check fails. (jaimin) Date: Mon, 16 Jun 2014 20:59:34 +0000 (UTC) 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 Authored: Mon Jun 16 13:59:10 2014 -0700 Committer: Jaimin Jetly 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