|
@@ -1070,49 +1070,19 @@ describe('App.WizardController', function () {
|
|
|
serviceName: 'KERBEROS',
|
|
|
configs: [
|
|
|
Em.Object.create({
|
|
|
- id: 'id',
|
|
|
name: 'admin_password',
|
|
|
value: 'value',
|
|
|
- defaultValue: 'defaultValue',
|
|
|
- description: 'description',
|
|
|
serviceName: 'serviceName',
|
|
|
- domain: 'domain',
|
|
|
- isVisible: true,
|
|
|
- isNotDefaultValue: true,
|
|
|
isFinal: true,
|
|
|
- defaultIsFinal: true,
|
|
|
- supportsFinal: true,
|
|
|
- filename: 'krb5-conf.xml',
|
|
|
- displayType: 'string',
|
|
|
- isRequiredByAgent: true,
|
|
|
- hasInitialValue: true,
|
|
|
- isRequired: true,
|
|
|
- group: {name: 'group'},
|
|
|
- showLabel: true,
|
|
|
- category: 'some_category'
|
|
|
+ filename: 'krb5-conf.xml'
|
|
|
}),
|
|
|
|
|
|
Em.Object.create({
|
|
|
- id: 'id',
|
|
|
name: 'admin_principal',
|
|
|
value: 'value',
|
|
|
- defaultValue: 'defaultValue',
|
|
|
- description: 'description',
|
|
|
serviceName: 'serviceName',
|
|
|
- domain: 'domain',
|
|
|
- isVisible: true,
|
|
|
- isNotDefaultValue: true,
|
|
|
isFinal: true,
|
|
|
- defaultIsFinal: true,
|
|
|
- supportsFinal: true,
|
|
|
- filename: 'krb5-conf.xml',
|
|
|
- displayType: 'string',
|
|
|
- isRequiredByAgent: true,
|
|
|
- hasInitialValue: true,
|
|
|
- isRequired: true,
|
|
|
- group: {name: 'group'},
|
|
|
- showLabel: true,
|
|
|
- category: 'some_category'
|
|
|
+ filename: 'krb5-conf.xml'
|
|
|
})
|
|
|
]
|
|
|
})
|
|
@@ -1126,48 +1096,18 @@ describe('App.WizardController', function () {
|
|
|
serviceName: 'HDFS',
|
|
|
configs: [
|
|
|
Em.Object.create({
|
|
|
- id: 'id',
|
|
|
name: 'name',
|
|
|
value: 'value',
|
|
|
- defaultValue: 'defaultValue',
|
|
|
- description: 'description',
|
|
|
serviceName: 'serviceName',
|
|
|
- domain: 'domain',
|
|
|
- isVisible: true,
|
|
|
- isNotDefaultValue: true,
|
|
|
isFinal: true,
|
|
|
- defaultIsFinal: true,
|
|
|
- supportsFinal: true,
|
|
|
filename: 'hdfs-site',
|
|
|
- displayType: 'string',
|
|
|
- isRequiredByAgent: true,
|
|
|
- hasInitialValue: true,
|
|
|
- isRequired: true,
|
|
|
- isUserProperty: true,
|
|
|
- showLabel: true,
|
|
|
- category: 'some_category'
|
|
|
}),
|
|
|
Em.Object.create({
|
|
|
- id: 'id',
|
|
|
name: 'name2',
|
|
|
value: 'value',
|
|
|
- defaultValue: 'defaultValue',
|
|
|
- description: 'description',
|
|
|
serviceName: 'serviceName',
|
|
|
- domain: 'domain',
|
|
|
- isVisible: true,
|
|
|
- isNotDefaultValue: true,
|
|
|
isFinal: true,
|
|
|
- defaultIsFinal: true,
|
|
|
- supportsFinal: true,
|
|
|
- filename: 'hdfs-site',
|
|
|
- displayType: 'string',
|
|
|
- isRequiredByAgent: true,
|
|
|
- hasInitialValue: true,
|
|
|
- isRequired: false,
|
|
|
- isUserProperty: false,
|
|
|
- showLabel: true,
|
|
|
- category: 'some_category'
|
|
|
+ filename: 'hdfs-site'
|
|
|
})
|
|
|
]
|
|
|
}),
|
|
@@ -1175,26 +1115,11 @@ describe('App.WizardController', function () {
|
|
|
serviceName: 'YARN',
|
|
|
configs: [
|
|
|
Em.Object.create({
|
|
|
- id: 'id',
|
|
|
name: 'name',
|
|
|
value: 'value',
|
|
|
- defaultValue: 'defaultValue',
|
|
|
- description: 'description',
|
|
|
serviceName: 'serviceName',
|
|
|
- domain: 'domain',
|
|
|
- isVisible: true,
|
|
|
isFinal: true,
|
|
|
- defaultIsFinal: true,
|
|
|
- supportsFinal: true,
|
|
|
- filename: 'filename',
|
|
|
- displayType: 'string',
|
|
|
- isRequiredByAgent: true,
|
|
|
- hasInitialValue: true,
|
|
|
- isRequired: true,
|
|
|
- isUserProperty: false,
|
|
|
- group: {name: 'group'},
|
|
|
- showLabel: true,
|
|
|
- category: 'some_category'
|
|
|
+ filename: 'filename'
|
|
|
})
|
|
|
]
|
|
|
})
|
|
@@ -1203,8 +1128,7 @@ describe('App.WizardController', function () {
|
|
|
it('should save configs from default config group to content.serviceConfigProperties', function () {
|
|
|
c.saveServiceConfigProperties(stepController);
|
|
|
var saved = c.get('content.serviceConfigProperties');
|
|
|
- expect(saved.length).to.equal(2);
|
|
|
- expect(saved[0].category).to.equal('some_category');
|
|
|
+ expect(saved.length).to.equal(3);
|
|
|
});
|
|
|
|
|
|
it('should not save admin_principal or admin_password to the localStorage', function () {
|
|
@@ -1212,17 +1136,6 @@ describe('App.WizardController', function () {
|
|
|
var saved = c.get('content.serviceConfigProperties');
|
|
|
expect(saved.everyProperty('value', '')).to.be.true;
|
|
|
});
|
|
|
-
|
|
|
- it('should save `isUserProperty` and `isRequired` attributes correctly', function() {
|
|
|
- c.saveServiceConfigProperties(stepController);
|
|
|
- var saved = c.get('content.serviceConfigProperties'),
|
|
|
- nameProp = saved.filterProperty('filename', 'hdfs-site.xml').findProperty('name', 'name'),
|
|
|
- name2Prop = saved.filterProperty('filename', 'hdfs-site.xml').findProperty('name', 'name2');
|
|
|
- assert.isTrue(Em.get(nameProp, 'isRequired'), 'hdfs-site.xml:name isRequired validation');
|
|
|
- assert.isTrue(Em.get(nameProp, 'isUserProperty'), 'hdfs-site.xml:name isUserProperty validation');
|
|
|
- assert.isFalse(Em.get(name2Prop, 'isRequired'), 'hdfs-site.xml:name2 isRequired validation');
|
|
|
- assert.isFalse(Em.get(name2Prop, 'isUserProperty'), 'hdfs-site.xml:name2 isUserProperty validation');
|
|
|
- });
|
|
|
});
|
|
|
|
|
|
describe('#enableStep', function () {
|