Esempio n. 1
0
    def run(self):
        """
        The main application execution method
        """
        logger.info("Running Containers Testing Framework cli")

        try:
            check_call("git submodule update --init", shell=True)
        except:
            pass

        # TODO: Remove this or rework, once more types are implemented
        if self._cli_conf.get(
                CTFCliConfig.GLOBAL_SECTION_NAME, CTFCliConfig.CONFIG_EXEC_TYPE) != 'ansible':
            raise CTFCliError("Wrong ExecType configured. Currently only 'ansible' is supported!")

        self._working_dir = BehaveWorkingDirectory(self._working_dir_path, self._cli_conf)

        # Setup Behave structure inside working directory
        # Clone common Features and steps into the working dir
        # Add the project specific Features and steps
        # Prepare the steps.py in the Steps dir that combines all the other
        self._working_dir.setup()

        # Execute Behave
        self._behave_runner = BehaveRunner(self._working_dir, self._cli_conf)
        sys.exit(self._behave_runner.run())
Esempio n. 2
0
    def run(self):
        """
        The main application execution method
        """
        logger.info("Running Containers Testing Framework cli")

        self._working_dir = BehaveWorkingDirectory(self._working_dir_path,
                                                   self._cli_conf)

        # Setup Behave structure inside working directory
        # Clone common Features and steps into the working dir
        # Add the project specific Features and steps
        # Prepare the steps.py in the Steps dir that combines all the other
        self._working_dir.setup()

        # Execute Behave
        self._behave_runner = BehaveRunner(self._working_dir, self._cli_conf)
        return self._behave_runner.run()