Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

intelmqctl and intelmqdump tests require an installed IntelMQ instance #2369

Closed
wagner-intevation opened this issue May 24, 2023 · 0 comments · Fixed by #2370
Closed

intelmqctl and intelmqdump tests require an installed IntelMQ instance #2369

wagner-intevation opened this issue May 24, 2023 · 0 comments · Fixed by #2370
Assignees
Labels
bug Indicates an unexpected problem or unintended behavior component: tests
Milestone

Comments

@wagner-intevation
Copy link
Contributor

This is a revival of #2300 (ctl tests require an installed IntelMQ instance). These tests are affected now:

  • TestIntelMQController::test_check_handles_syntaxerror_when_importing_bots
  • TestIntelMQController::test_check_pass_with_default_runtime
  • TestIntelMQController::test_check_passed_with_default_harmonization_and_empty_runtime
  • TestIntelMQDump::test_get_dump_for_one_bot
  • TestIntelMQDump::test_list_and_select_dump_from_custom_location
  • TestIntelMQDump::test_list_and_select_dump_from_global_location
  • TestIntelMQDump::test_list_dumps_for_all_bots_from_custom_locations
  • TestIntelMQDump::test_list_dumps_for_all_bots_from_default_log_path
  • TestIntelMQDump::test_selecting_dump_warns_when_filename_is_ambiguous

the ctl tests have a traceback like this:

[  152s]   File "/usr/src/packages/BUILD/.pybuild/cpython3_3.9_intelmq/build/intelmq/lib/utils.py", line 224, in load_configuration
[  152s]     raise ValueError('File not found: %r.' % configuration_filepath)
[  152s] ValueError: File not found: '/etc/intelmq/runtime.yaml'.
[  152s] ERROR    intelmqctl:intelmqctl.py:127 No valid IntelMQ installation found: DistributionNotFound

and the dump tests don't find any dumps.

So I suggest to add a new skip-decorator and environment variable to skip tests depending on an installation by default. This also addresses https://lists.cert.at/pipermail/intelmq-dev/2023-May/000610.html

@wagner-intevation wagner-intevation changed the title ctl and dump tests requrie an installed IntelMQ instance intelmqctl and intelmqdump tests require an installed IntelMQ instance May 24, 2023
wagner-intevation added a commit to wagner-intevation/intelmq that referenced this issue May 24, 2023
@sebix sebix added bug Indicates an unexpected problem or unintended behavior component: tests labels May 24, 2023
@sebix sebix added this to the 3.1.1 milestone May 24, 2023
wagner-intevation added a commit to wagner-intevation/intelmq that referenced this issue May 26, 2023
gethvi pushed a commit to gethvi/intelmq that referenced this issue Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior component: tests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants