site_properties_test.js 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /**
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. */
  18. var App = require('app');
  19. require('utils/helper');
  20. var siteProperties = require('data/HDP2/site_properties').configProperties;
  21. describe('hdp2SiteProperties', function () {
  22. // No site properties should be made invisible
  23. siteProperties.forEach(function(siteProperty){
  24. it('Check invisible attribute of "' + siteProperty.name + '"' + '. It should not be defined ', function () {
  25. expect(siteProperty.isVisible).to.equal(undefined);
  26. });
  27. });
  28. // No site properties should have value and recommendedValue defined on client side.
  29. // These should be always retrieved from server.
  30. siteProperties.forEach(function(siteProperty){
  31. it('Check value and recommendedValue attribute of "' + siteProperty.name + '"' + '. It should not be defined ', function () {
  32. expect(siteProperty.value).to.equal(undefined);
  33. expect(siteProperty.recommendedValue).to.equal(undefined);
  34. });
  35. });
  36. // No site properties should have description field duplicated on client side.
  37. // These should be always retrieved from server.
  38. siteProperties.forEach(function(siteProperty){
  39. it('Check description attribute of "' + siteProperty.name + '"' + '. It should not be defined ', function () {
  40. expect(siteProperty.description).to.equal(undefined);
  41. });
  42. });
  43. // All the site properties should be persisted in the configuration tag
  44. // So isRequiredByAgent should be never defined over here
  45. // These should be always retrieved from server and saved in the correct configuration resource via API.
  46. siteProperties.forEach(function(siteProperty){
  47. it('Check isRequiredByAgent attribute of "' + siteProperty.name + '"' + '. It should not be defined ', function () {
  48. expect(siteProperty.isRequiredByAgent).to.equal(undefined);
  49. });
  50. });
  51. // All Falcon site properties should be mapped to site file. There is a property with same name (*.domain)
  52. // in different site files of Falcon service
  53. var falconSiteProperties = siteProperties.filterProperty('serviceName','FALCON');
  54. falconSiteProperties.forEach(function(siteProperty){
  55. it('Check filename attribute for "' + siteProperty.name + '"' + ' property of Falcon service. It should be defined ', function () {
  56. expect(siteProperty).to.have.property('filename');
  57. });
  58. });
  59. });