def test_configure_unmanaged_ad(self): json_data = use_cases.get_unmanged_ad_use_case() self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/kerberos_client.py", classname="KerberosClient", command="configure", config_dict=json_data, stack_version=self.STACK_VERSION, target=RMFTestCase.TARGET_COMMON_SERVICES) self.assertResourceCalled('Directory', use_cases.get_krb5_conf_dir(json_data), owner='root', group='root', mode=0755, create_parents=True) file_path = (use_cases.get_krb5_conf_dir(json_data) + "/" + use_cases.get_krb5_conf_file(json_data)) self.assertResourceCalled( 'File', file_path, content=InlineTemplate( use_cases.get_krb5_conf_template(json_data)), owner='root', group='root', mode=0644)
def test_configure_unmanaged_ad(self): json_data = use_cases.get_unmanged_ad_use_case() self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/kerberos_client.py", classname="KerberosClient", command="configure", config_dict=json_data, hdp_stack_version = self.STACK_VERSION, target = RMFTestCase.TARGET_COMMON_SERVICES ) self.assertResourceCalled('Directory', use_cases.get_krb5_conf_dir(json_data), owner='root', group='root', mode=0755, recursive=True) file_path = (use_cases.get_krb5_conf_dir(json_data) + "/" + use_cases.get_krb5_conf_file(json_data)) self.assertResourceCalled('File', file_path, content=InlineTemplate(use_cases.get_krb5_conf_template(json_data)), owner='root', group='root', mode=0644)
def test_configure_unmanaged_ad(self): json_data = use_cases.get_unmanged_ad_use_case() self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/kerberos_server.py", classname="KerberosServer", command="configure", config_dict=json_data, hdp_stack_version = self.STACK_VERSION, target = RMFTestCase.TARGET_COMMON_SERVICES ) # Validate krb5.conf file self.assertResourceCalled('Directory', use_cases.get_krb5_conf_dir(json_data), owner='root', group='root', mode=0755, recursive=True) file_path = (use_cases.get_krb5_conf_dir(json_data) + "/" + use_cases.get_krb5_conf_file(json_data)) self.assertResourceCalled('File', file_path, content=InlineTemplate(use_cases.get_krb5_conf_template(json_data)), owner='root', group='root', mode=0644) # Validate kdc.conf file self.assertResourceCalled('Directory', use_cases.get_kdc_conf_dir(json_data), owner='root', group='root', mode=0700, recursive=True) file_path = (use_cases.get_kdc_conf_dir(json_data) + "/" + use_cases.get_kdc_conf_file(json_data)) self.assertResourceCalled('File', file_path, content=InlineTemplate(use_cases.get_kdc_conf_template(json_data)), owner='root', group='root', mode=0600) # Validate kadm5.acl file self.assertResourceCalled('Directory', use_cases.get_kadm5_acl_dir(json_data), owner='root', group='root', mode=0700, recursive=True) file_path = (use_cases.get_kadm5_acl_dir(json_data) + "/" + use_cases.get_kadm5_acl_file(json_data)) self.assertResourceCalled('File', file_path, content=InlineTemplate(use_cases.get_kadm5_acl_template(json_data)), owner='root', group='root', mode=0600)
def test_configure_unmanaged_ad(self): json_data = use_cases.get_unmanged_ad_use_case() self.executeScript( self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/kerberos_server.py", classname="KerberosServer", command="configure", config_dict=json_data, hdp_stack_version=self.STACK_VERSION, target=RMFTestCase.TARGET_COMMON_SERVICES, ) # Validate krb5.conf file self.assertResourceCalled( "Directory", use_cases.get_krb5_conf_dir(json_data), owner="root", group="root", mode=0755, recursive=True ) file_path = use_cases.get_krb5_conf_dir(json_data) + "/" + use_cases.get_krb5_conf_file(json_data) self.assertResourceCalled( "File", file_path, content=InlineTemplate(use_cases.get_krb5_conf_template(json_data)), owner="root", group="root", mode=0644, ) # Validate kdc.conf file self.assertResourceCalled( "Directory", use_cases.get_kdc_conf_dir(json_data), owner="root", group="root", mode=0700, recursive=True ) file_path = use_cases.get_kdc_conf_dir(json_data) + "/" + use_cases.get_kdc_conf_file(json_data) self.assertResourceCalled( "File", file_path, content=InlineTemplate(use_cases.get_kdc_conf_template(json_data)), owner="root", group="root", mode=0600, ) # Validate kadm5.acl file self.assertResourceCalled( "Directory", use_cases.get_kadm5_acl_dir(json_data), owner="root", group="root", mode=0700, recursive=True ) file_path = use_cases.get_kadm5_acl_dir(json_data) + "/" + use_cases.get_kadm5_acl_file(json_data) self.assertResourceCalled( "File", file_path, content=InlineTemplate(use_cases.get_kadm5_acl_template(json_data)), owner="root", group="root", mode=0600, )