Beispiel #1
0
    def test_repo_name_in_list(self):
        """Function:  test_repo_name_in_list

        Description:  Test repo name is in list.

        Arguments:

        """

        self.assertFalse(
            elastic_db_repo.delete_repo(self.els, args_array=self.args_array))
Beispiel #2
0
    def test_err_flag_false(self):
        """Function:  test_err_flag_false

        Description:  Test err_flag is set to False.

        Arguments:

        """

        self.assertFalse(
            elastic_db_repo.delete_repo(self.els, args_array=self.args_array))
Beispiel #3
0
    def test_repo_name_not_passed(self):
        """Function:  test_repo_name_not_passed

        Description:  Test repo name is not passed as an argument.

        Arguments:

        """

        with gen_libs.no_std_out():
            self.assertFalse(
                elastic_db_repo.delete_repo(
                    self.els, args_array={"-D": "Test_Repo_Name_3"}))
Beispiel #4
0
    def test_no_argsarray_is_passed(self):
        """Function:  test_no_argsarray_is_passed

        Description:  Test when args_array is not passed to function.

        Arguments:

        """

        with gen_libs.no_std_out():
            self.assertFalse(
                elastic_db_repo.delete_repo(self.els,
                                            repo_name="Test_Repo_Name_3"))
    def test_deleterepo_arg(self):
        """Function:  test_deleterepo_arg

        Description:  Test deleting repository from argument list.

        Arguments:

        """

        self.assertFalse(
            elastic_db_repo.delete_repo(self.els,
                                        repo_name=self.repo_name,
                                        args_array={}))
    def test_deleterepo_cmdline(self):
        """Function:  test_deleterepo_cmdline

        Description:  Test deleting repository from command line.

        Arguments:

        """

        args_array = {"-D": "TEST_INTR_REPO"}

        self.assertFalse(
            elastic_db_repo.delete_repo(self.els, args_array=args_array))
Beispiel #7
0
    def test_repo_name_not_in_list(self):
        """Function:  test_repo_name_not_in_list

        Description:  Test repo name is not in list.

        Arguments:

        """

        with gen_libs.no_std_out():
            self.assertFalse(
                elastic_db_repo.delete_repo(self.els,
                                            repo_name="Test_Repo_Name_3",
                                            args_array=self.args_array))
Beispiel #8
0
    def test_err_flag_true(self):
        """Function:  test_err_flag_true

        Description:  Test err_flag is set to True.

        Arguments:

        """

        self.args_array["-D"] = "Test_Repo_Name_False"

        with gen_libs.no_std_out():
            self.assertFalse(
                elastic_db_repo.delete_repo(self.els,
                                            args_array=self.args_array))