Robert Levas created AMBARI-9895:
------------------------------------

             Summary: 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
             Fix For: 2.0.0


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)

Reply via email to