You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2015/03/01 19:14:29 UTC
ambari git commit: AMBARI-9856. ignore skip group modification text
is incorrect (alexantonenko)
Repository: ambari
Updated Branches:
refs/heads/branch-2.0.0 96899fd58 -> 9d617dbe1
AMBARI-9856. ignore skip group modification text is incorrect (alexantonenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9d617dbe
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9d617dbe
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9d617dbe
Branch: refs/heads/branch-2.0.0
Commit: 9d617dbe1db93d6fa4c3543e8e729a8c1755b14e
Parents: 96899fd
Author: Alex Antonenko <hi...@gmail.com>
Authored: Sun Mar 1 18:50:51 2015 +0200
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Sun Mar 1 20:14:14 2015 +0200
----------------------------------------------------------------------
ambari-web/app/utils/config.js | 3 +-
ambari-web/test/utils/config_test.js | 155 ++++++++++++++++++++++++++++++
2 files changed, 157 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/9d617dbe/ambari-web/app/utils/config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js
index 548ed0c..8acf51a 100644
--- a/ambari-web/app/utils/config.js
+++ b/ambari-web/app/utils/config.js
@@ -989,7 +989,8 @@ App.config = Em.Object.create({
'smokeuser': 'Smoke Test User',
'user_group': 'Hadoop Group',
'mapred_user': 'MapReduce User',
- 'zk_user': 'ZooKeeper User'
+ 'zk_user': 'ZooKeeper User',
+ 'ignore_groupsusers_create': 'Skip group modifications during install'
};
if (config.property_type.contains('USER') || config.property_type.contains('GROUP')) {
propertyData.id = "puppet var";
http://git-wip-us.apache.org/repos/asf/ambari/blob/9d617dbe/ambari-web/test/utils/config_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/utils/config_test.js b/ambari-web/test/utils/config_test.js
index 2b141e2..cbc3ee1 100644
--- a/ambari-web/test/utils/config_test.js
+++ b/ambari-web/test/utils/config_test.js
@@ -833,4 +833,159 @@ describe('App.config', function () {
});
});
+ describe('#advancedConfigIdentityData', function () {
+
+ var configs = [
+ {
+ input: {
+ property_type: ['USER'],
+ property_name: 'hdfs_user'
+ },
+ output: {
+ id: 'puppet var',
+ category: 'Users and Groups',
+ isVisible: true,
+ serviceName: 'MISC',
+ isOverridable: false,
+ isReconfigurable: false,
+ displayName: 'HDFS User',
+ displayType: 'user',
+ index: 30
+ },
+ title: 'user, no service name specified, default display name behaviour'
+ },
+ {
+ input: {
+ property_type: ['GROUP'],
+ property_name: 'knox_group',
+ service_name: 'KNOX'
+ },
+ output: {
+ id: 'puppet var',
+ category: 'Users and Groups',
+ isVisible: true,
+ serviceName: 'MISC',
+ isOverridable: false,
+ isReconfigurable: false,
+ displayName: 'Knox Group',
+ displayType: 'user',
+ index: 0
+ },
+ title: 'group, service_name = KNOX, default display name behaviour'
+ },
+ {
+ input: {
+ property_type: ['USER']
+ },
+ output: {
+ isVisible: false
+ },
+ isHDPWIN: true,
+ title: 'HDPWIN stack'
+ },
+ {
+ input: {
+ property_type: ['USER'],
+ property_name: 'smokeuser',
+ service_name: 'MISC'
+ },
+ output: {
+ displayName: 'Smoke Test User',
+ serviceName: 'MISC',
+ belongsToService: ['MISC'],
+ index: 30
+ },
+ title: 'smokeuser, service_name = MISC'
+ },
+ {
+ input: {
+ property_type: ['GROUP'],
+ property_name: 'user_group'
+ },
+ output: {
+ displayName: 'Hadoop Group'
+ },
+ title: 'user_group'
+ },
+ {
+ input: {
+ property_type: ['USER'],
+ property_name: 'mapred_user'
+ },
+ output: {
+ displayName: 'MapReduce User'
+ },
+ title: 'mapred_user'
+ },
+ {
+ input: {
+ property_type: ['USER'],
+ property_name: 'zk_user'
+ },
+ output: {
+ displayName: 'ZooKeeper User'
+ },
+ title: 'zk_user'
+ },
+ {
+ input: {
+ property_type: ['USER'],
+ property_name: 'ignore_groupsusers_create'
+ },
+ output: {
+ displayName: 'Skip group modifications during install',
+ displayType: 'checkbox'
+ },
+ title: 'ignore_groupsusers_create'
+ },
+ {
+ input: {
+ property_type: ['GROUP'],
+ property_name: 'proxyuser_group'
+ },
+ output: {
+ belongsToService: ['HIVE', 'OOZIE', 'FALCON']
+ },
+ title: 'proxyuser_group'
+ },
+ {
+ input: {
+ property_type: ['PASSWORD'],
+ property_name: 'javax.jdo.option.ConnectionPassword'
+ },
+ output: {
+ displayType: 'password'
+ },
+ title: 'password'
+ }
+ ];
+
+ before(function () {
+ sinon.stub(App.StackService, 'find').returns([
+ {
+ serviceName: 'KNOX'
+ }
+ ]);
+ });
+
+ afterEach(function () {
+ App.get.restore();
+ });
+
+ after(function () {
+ App.StackService.find.restore();
+ });
+
+ configs.forEach(function (item) {
+ it(item.title, function () {
+ sinon.stub(App, 'get').withArgs('isHadoopWindowsStack').returns(Boolean(item.isHDPWIN));
+ var propertyData = App.config.advancedConfigIdentityData(item.input);
+ Em.keys(item.output).forEach(function (key) {
+ expect(propertyData[key]).to.eql(item.output[key]);
+ });
+ });
+ });
+
+ });
+
});