Exemplo n.º 1
0
 def run(self):
     """Find all tests and run them."""
     import_tests(self.logger, self.tests_dir, 'test_*')
     tests = [test(self.logger) for test in TestSources.__subclasses__()]
     self.logger.debug('FOUND TESTS: %s', tests)
     self.set_environment('dev')
     err_count = execute_tests(tests, self.logger)
     assert err_count == 0
     return err_count
Exemplo n.º 2
0
 def run(self):
     """Find all tests and run them."""
     import_tests(self.logger, self.tests_dir, 'test_*')
     tests = [test(self.logger) for test in Commands.__subclasses__()]
     if not tests:
         raise Exception('No tests were found.')
     self.logger.debug('FOUND TESTS: %s', tests)
     err_count = execute_tests(tests, self.logger)
     assert err_count == 0  # assert that all subtests were successful
     return err_count
Exemplo n.º 3
0
 def run(self):
     """Find all Terraform tests and run them."""
     import_tests(self.logger, self.tests_dir, 'test_*')
     tests = [test(self.logger) for test in Terraform.__subclasses__()]
     if not tests:
         raise Exception('No tests were found.')
     self.logger.debug('FOUND TESTS: %s', tests)
     self.set_environment('dev')
     self.set_env_var('CI', '1')
     err_count = execute_tests(tests, self.logger)
     assert err_count == 0  # assert that all subtests were successful
     return err_count
Exemplo n.º 4
0
 def run(self):
     """Find all tests and run them."""
     import_tests(self.logger, self.tests_dir, "test_*")
     tests = [test(self.logger) for test in CDK.__subclasses__()]
     if not tests:
         raise Exception("No tests were found.")
     self.logger.debug("FOUND TESTS: %s", tests)
     self.set_environment("dev")
     self.set_env_var("PIPENV_VENV_IN_PROJECT", "1")
     err_count = execute_tests(tests, self.logger)
     assert err_count == 0  # assert that all subtests were successful
     return err_count
 def run(self):
     """Find all tests and run them."""
     import_tests(self.logger, self.tests_dir, 'test_*')
     tests = [
         test(self.logger) for test in RunwayModuleTypeDetection.__subclasses__()
     ]
     if not tests:
         raise Exception('No tests were found.')
     self.logger.debug('FOUND TESTS: %s', tests)
     self.set_environment('dev')
     err_count = execute_tests(tests, self.logger)
     assert err_count == 0
     return err_count
Exemplo n.º 6
0
 def run(self):
     """Find all tests and run them."""
     import_tests(self.logger, self.tests_dir, "test_*")
     self.set_environment("dev")
     tests = [
         test(self.logger, self.environment)
         for test in Parallelism.__subclasses__()
     ]
     if not tests:
         raise Exception("No tests were found.")
     self.logger.debug("FOUND TESTS: %s", tests)
     err_count = execute_tests(tests, self.logger)
     assert err_count == 0
     return err_count
Exemplo n.º 7
0
 def run(self):
     """Find all tests and run them."""
     suffix = os.getenv('COMMAND_SUFFIX', '*')
     pattern = 'test_{0}'.format(suffix)
     self.set_env_var('AWS_DEFAULT_REGION', 'us-east-1')
     import_tests(self.logger, self.tests_dir, pattern)
     tests = [
         test(self.logger, self.environment)
         for test in Commands.__subclasses__()
     ]
     if not tests:
         raise Exception('No tests were found.')
     self.logger.debug('FOUND TESTS: %s', tests)
     err_count = execute_tests(tests, self.logger)
     assert err_count == 0  # assert that all subtests were successful
     return err_count
Exemplo n.º 8
0
    def run(self):
        """Find all Serverless tests and run them."""
        self.set_env_var("CI", "1")
        import_tests(self.logger, self.base_dir, "serverless_test")
        serverless_test = Serverless.__subclasses__()[0]

        tests = []
        for template in os.listdir(self.templates_dir):
            if os.path.isdir(os.path.join(self.templates_dir, template)):
                self.logger.info('Found template "%s"', template)
                test = serverless_test(
                    template, self.templates_dir, self.environment, self.logger
                )
                tests.append(test)
            else:
                self.logger.warning('"%s" is not a directory, skipping...', template)

        if not tests:
            raise Exception("No tests were found.")

        err_count = execute_tests(tests, self.logger)
        assert err_count == 0  # assert that all subtests were successful
        return err_count