tests package
tests.analyze_results module
- class tests.analyze_results.Difference(what_failed, why_failed, what_not_failed)
Bases:
object
- tests.analyze_results.aggregate_results_by_scenarios(rule_results)
- tests.analyze_results.analyze_differences(rules)
- tests.analyze_results.analyze_pair(best, other)
- tests.analyze_results.main()
- tests.analyze_results.parse_args()
- tests.analyze_results.print_result_differences(json_results)
tests.ansible_playbooks_generated_for_all_rules module
- tests.ansible_playbooks_generated_for_all_rules.compare_ds_with_playbooks_dir(ds_path, playbooks_dir_path)
- tests.ansible_playbooks_generated_for_all_rules.main()
tests.assert_ansible_schema module
- tests.assert_ansible_schema.make_parser()
- tests.assert_ansible_schema.validate_comments(fname, args)
- tests.assert_ansible_schema.validate_input(fname, args)
- tests.assert_ansible_schema.validate_playbook(playbook, args)
- tests.assert_ansible_schema.validate_yaml(fname, args)
tests.ensure_paths_are_short module
- tests.ensure_paths_are_short.main()
tests.install_vm module
- tests.install_vm.err(rc, msg)
- tests.install_vm.get_virt_install_command(data)
- tests.install_vm.give_info(data)
- tests.install_vm.handle_disk(data)
- tests.install_vm.handle_kickstart(data)
- tests.install_vm.handle_rest(data)
- tests.install_vm.handle_ssh_pubkey(data)
- tests.install_vm.handle_url(data)
- tests.install_vm.join_extented_opt(opt_name, delim, opts)
- tests.install_vm.main()
- tests.install_vm.parse_args()
- tests.install_vm.path_from_tests(path)
- tests.install_vm.run_virt_install(data, command)
- tests.install_vm.wait_vm_not_running(domain)
tests.missing_cces module
- tests.missing_cces.check_all_rules(root, filter_profiles)
- tests.missing_cces.get_selected_rules(benchmark, filter_profiles)
- tests.missing_cces.get_selections_by_profile(benchmark, filter_profiles)
- tests.missing_cces.good_profile(profile_id, filter_profiles)
- tests.missing_cces.match_profile(needle, haystack)
tests.oval_tester module
- class tests.oval_tester.OVALTester(verbose)
Bases:
object
- finish()
Exit test with an appropriate return code.
- test(description, oval_content, config_file_content, expected_result)
Execute a test. description: a very short description to be displayed in test output oval_content: content of the OVAL shorthand file written in a way you
write OVALs in SSG rules (not a valid OVAL)
- config_file_content: content of the text configuration file that the
OVAL will check
expected_result: expected result of evaluation of the OVAL definition
tests.run_scapval module
- tests.run_scapval.main()
- tests.run_scapval.parse_args()
- tests.run_scapval.print_requirement_feedback(req_id, message)
- tests.run_scapval.process_results(result_path)
- tests.run_scapval.test_datastream(datastream_path, scapval_path, scap_version)
tests.stable_profile_ids module
- tests.stable_profile_ids.check_build_dir(build_dir)
- tests.stable_profile_ids.gather_profiles_from_datastream(path, build_dir, profiles_per_benchmark)
- tests.stable_profile_ids.main()
- tests.stable_profile_ids.parse_args()
- tests.stable_profile_ids.respective_datastream_absent(bench_id, build_dir)
tests.test_machine_only_rules module
- tests.test_machine_only_rules.check_if_machine_only(dirpath, name, is_machine_only_group)
- tests.test_machine_only_rules.check_product(ds_path, rules_dirs)
- tests.test_machine_only_rules.get_element_fix_text_by_system(element)
- tests.test_machine_only_rules.get_only_elements_to_check_from_benchmark(benchmark, element_query, short_ids_to_check)
- tests.test_machine_only_rules.machine_platform_missing_in_rules(ds_path, short_ids_to_check)
- tests.test_machine_only_rules.main()
- tests.test_machine_only_rules.parse_command_line_args()
- tests.test_machine_only_rules.scan_rules_group(dir_path, parent_machine_only, groups, rules)
- tests.test_machine_only_rules.scan_rules_groups(dir_paths, parent_machine_only)
- tests.test_machine_only_rules.shorten_id(full_id)
tests.test_macros_oval module
- tests.test_macros_oval.main()
tests.test_parse_affected module
- tests.test_parse_affected.main()
Walk through all known products in the ssg root specified in sys.argv[1], and ensure that all ovals in all rule directories are parsable under ssg.oval.parse_affected(…).
- tests.test_parse_affected.parse_affected(cur_dir, env_yaml)
tests.test_parse_platform module
- tests.test_parse_platform.main()
Walk through all known products in the ssg root specified in sys.argv[1], and ensure that all fixes in all rule directories are parsable under ssg.fixes.parse_platform(…).
- tests.test_parse_platform.parse_platform(cur_dir)
tests.test_profile_stability module
- tests.test_profile_stability.compare_sets(reference, sample)
- tests.test_profile_stability.corresponding_product_built(build_dir, reference_fname)
- tests.test_profile_stability.describe_change(difference, name)
- tests.test_profile_stability.get_matching_compiled_profile_filename(build_dir, reference_fname)
- tests.test_profile_stability.get_profile_name_from_reference_filename(fname)
- tests.test_profile_stability.get_reference_vs_built_difference(reference_fname, built_fname)
- tests.test_profile_stability.get_references_filenames(ref_root)
- tests.test_profile_stability.get_selections_key_from_yaml(yaml_fname)
- tests.test_profile_stability.inform_and_append_fix_based_on_reference_compiled_profile(ref, build_root, fix_commands)
- tests.test_profile_stability.main()