def _get_test_configs(): # type: () -> List[List[Dict]] """Gets all test configs in preprocessor_tests.""" required_keys = ['test_name', 'report_blob_name', 'input_pattern', 'expected_contents'] test_file_path = os.path.join(os.getcwd(), _TEST_FOLDER) return run_tests_common.get_configs(test_file_path, required_keys)
def _get_test_configs(run_presubmit_tests, run_all_tests): # type: (bool, bool) -> List[Dict] """Gets all test configs in integration directory and subdirectories.""" required_keys = [ 'test_name', 'table_name', 'input_pattern', 'assertion_configs' ] test_file_path = _get_test_file_path(run_presubmit_tests, run_all_tests) test_configs = run_tests_common.get_configs(test_file_path, required_keys) for test_config in test_configs: assertion_configs = test_config['assertion_configs'] for assertion_config in assertion_configs: _validate_assertion_config(assertion_config) return test_configs
def _get_test_configs(run_presubmit_tests, run_all_tests, test_file_suffix=''): # type: (bool, bool, str) -> List[List[Dict]] """Gets all test configs.""" required_keys = ['test_name', 'table_name', 'assertion_configs'] test_file_path = _get_test_file_path(run_presubmit_tests, run_all_tests, test_file_suffix) test_configs = run_tests_common.get_configs(test_file_path, required_keys, test_file_suffix) for test_case_configs in test_configs: for test_config in test_case_configs: assertion_configs = test_config['assertion_configs'] for assertion_config in assertion_configs: _validate_assertion_config(assertion_config) return test_configs
def _get_test_configs(): # type: () -> List[List[Dict]] """Gets all test configs in bq_to_vcf_tests.""" required_keys = ['input_table', 'output_file_name', 'expected_output_file'] test_file_path = os.path.join(os.getcwd(), _TEST_FOLDER) return run_tests_common.get_configs(test_file_path, required_keys)