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

Functional OSSEC tests are being skipped #3689

Open
conorsch opened this issue Aug 2, 2018 · 1 comment
Open

Functional OSSEC tests are being skipped #3689

conorsch opened this issue Aug 2, 2018 · 1 comment

Comments

@conorsch
Copy link
Contributor

conorsch commented Aug 2, 2018

Description

The testinfra config test suite has a few functional tests, designed to validate the journalist notification functionality, located at testinfra/ossec/test_journalist_mail.py. During work on #3208, we discovered that these tests aren't actually running in CI with any regularity. It appears they're always skipped.

Steps to Reproduce

  1. Observe a recent CI run, and retrieve the test result artifacts; this CI run'll do fine: https://circleci.com/gh/freedomofpress/securedrop/16490#artifacts/containers/0
  2. Inspect the test results for pass/fail/skip reports on the test_journalist_mail.py tests specifically. I'll save you the trouble of munging those files locally—see the folded details below.
Test result details
============================= test session starts ==============================
platform linux2 -- Python 2.7.13, pytest-3.2.0, py-1.4.34, pluggy-0.4.0 -- /usr/bin/python
cachedir: //.cache
rootdir: /, inifile:
plugins: testinfra-1.12.0, xdist-1.18.2
gw0 I / gw1 I / gw2 I / gw3 I / gw4 I / gw5 I / gw6 I / gw7 I
[gw0] linux2 Python 2.7.13 cwd: /root/sd
[gw1] linux2 Python 2.7.13 cwd: /root/sd
[gw2] linux2 Python 2.7.13 cwd: /root/sd
[gw3] linux2 Python 2.7.13 cwd: /root/sd
[gw4] linux2 Python 2.7.13 cwd: /root/sd
[gw5] linux2 Python 2.7.13 cwd: /root/sd
[gw6] linux2 Python 2.7.13 cwd: /root/sd
[gw7] linux2 Python 2.7.13 cwd: /root/sd
[gw0] Python 2.7.13 (default, Jan 19 2017, 14:48:08) -- [GCC 6.3.0 20170118]
[gw1] Python 2.7.13 (default, Jan 19 2017, 14:48:08) -- [GCC 6.3.0 20170118]
[gw3] Python 2.7.13 (default, Jan 19 2017, 14:48:08) -- [GCC 6.3.0 20170118]
[gw2] Python 2.7.13 (default, Jan 19 2017, 14:48:08) -- [GCC 6.3.0 20170118]
[gw4] Python 2.7.13 (default, Jan 19 2017, 14:48:08) -- [GCC 6.3.0 20170118]
[gw5] Python 2.7.13 (default, Jan 19 2017, 14:48:08) -- [GCC 6.3.0 20170118]
[gw6] Python 2.7.13 (default, Jan 19 2017, 14:48:08) -- [GCC 6.3.0 20170118]
[gw7] Python 2.7.13 (default, Jan 19 2017, 14:48:08) -- [GCC 6.3.0 20170118]
gw0 [6] / gw1 [6] / gw2 [6] / gw3 [6] / gw4 [6] / gw5 [6] / gw6 [6] / gw7 [6]

scheduling tests via LoadScheduling

//testinfra/ossec/test_journalist_mail.py::TestJournalistMail::test_send_encrypted_alert[ssh:/staging] 
//testinfra/ossec/test_journalist_mail.py::TestJournalistMail::test_journalist_mail_notification[ssh:/staging] 
//testinfra/ossec/test_journalist_mail.py::TestJournalistMail::test_ossec_rule_journalist[ssh:/staging] 
//testinfra/ossec/test_journalist_mail.py::TestJournalistMail::test_process_submissions_today[ssh:/staging] 
//testinfra/ossec/test_journalist_mail.py::TestJournalistMail::test_procmail[ssh:/staging] 
//testinfra/ossec/test_journalist_mail.py::TestJournalistMail::test_missing_journalist_alert[ssh:/staging] 
[gw6] SKIPPED //testinfra/ossec/test_journalist_mail.py::TestJournalistMail::test_ossec_rule_journalist[ssh:/staging] 
[gw4] SKIPPED //testinfra/ossec/test_journalist_mail.py::TestJournalistMail::test_journalist_mail_notification[ssh:/staging] 
[gw3] SKIPPED //testinfra/ossec/test_journalist_mail.py::TestJournalistMail::test_process_submissions_today[ssh:/staging] 
[gw7] SKIPPED //testinfra/ossec/test_journalist_mail.py::TestJournalistMail::test_send_encrypted_alert[ssh:/staging] 
[gw5] SKIPPED //testinfra/ossec/test_journalist_mail.py::TestJournalistMail::test_missing_journalist_alert[ssh:/staging] 
[gw1] SKIPPED //testinfra/ossec/test_journalist_mail.py::TestJournalistMail::test_procmail[ssh:/staging] 

--------------- generated xml file: /root/sd/staging-results.xml ---------------
=============================== warnings summary ===============================
None
 Module already imported so can not be re-written: testinfra

-- Docs: http://doc.pytest.org/en/latest/warnings.html
==================== 6 skipped, 1 warnings in 1.26 seconds =====================
Running Testinfra suite against 'staging'...
Target roles:
 - testinfra/ossec

Expected Behavior

  1. Tests run!
  2. Tests pass.

Actual Behavior

  1. Tests are skipped.
  2. No error is raised.

Comments

In the context of #3208, I'm going to mark the tests as intentionally skipped. We can circle back and reevaluate the test logic to get it passing once the reorg described by #3208 stabilizes. N.B. discovering problems like this were a strong motivation to excise testinfra/test.py, which is how we found the problem.

@eloquence
Copy link
Member

Would be good to re-verify current behavior, can further investigate as part of late-stage Focal tasks (#4768).

legoktm added a commit that referenced this issue Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants