Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-9895

security_status test cases sporadically fail due to import of status_params module

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • ambari-agent

    Description

      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:

      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)
      
      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'
          )
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            rlevas Robert Levas
            rlevas Robert Levas
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment