[
https://issues.apache.org/jira/browse/AMBARI-9895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robert Levas updated AMBARI-9895:
---------------------------------
Attachment: AMBARI-9895_01.patch
* Updated unit tests to not use the status_params module
* Performed some general clean up in touched unit tests
* Forced all calls to {{cached_kinit_executor}} to use the default timeout
Patch File [^AMBARI-9895_01.patch]
> security_status test cases sporadically fail due to import of status_params
> module
> ----------------------------------------------------------------------------------
>
> Key: AMBARI-9895
> URL: https://issues.apache.org/jira/browse/AMBARI-9895
> Project: Ambari
> Issue Type: Bug
> Components: ambari-agent
> Affects Versions: 2.0.0
> Reporter: Robert Levas
> Assignee: Robert Levas
> Labels: kerberos
> Fix For: 2.0.0
>
> Attachments: AMBARI-9895_01.patch
>
>
> security_status test cases sporadically fail due to import of status_params
> module. For example {{test_security_status}} in
> {{stacks/2.0.6/HDFS/test_hdfs_client.py}} imports {{status_params.py}} which
> is not in the test directory path.
> Instead of importing {{status_params.py}}, use values from
> {{self.config_dict}}
> Example:
> {code:title=Before}
> cached_kinit_executor_mock.called_with(status_params.kinit_path_local,
> status_params.hdfs_user,
> status_params.hdfs_user_keytab,
> status_params.hdfs_user_principal,
> status_params.hostname,
> status_params.tmp_dir)
> {code}
> {code:title=After}
> cached_kinit_executor_mock.called_with(
> '/usr/bin/kinit',
> self.config_dict['configurations']['hadoop-env']['hdfs_user'],
> self.config_dict['configurations']['hadoop-env']['hdfs_user_keytab'],
>
> self.config_dict['configurations']['hadoop-env']['hdfs_user_principal_name'],
> self.config_dict['hostname'],
> '/tmp'
> )
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)