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

Fix sqlite3.OperationalError: no such table: VULNERABILITIES error #1067

Merged
merged 6 commits into from
Feb 16, 2021

Conversation

jmv74211
Copy link
Contributor

Related issue
closes #1020

Hi,

This PR fixes the following error:

sqlite3.OperationalError: no such table: VULNERABILITIES

produced when launching a scan test on a clean installation of wazuh (by default cve.db does not exist until vuln detector is activated and wazuh-modulesd is restarted).

The fix has consisted of adding a new fixture that after applying the ossec.conf configuration and restarting wazuh-modulesd there is a wait (up to a maximum of 30 seconds) until the database and tables have been created.

This is done before doing any operation with the database (insert vulnerabilities ...)

Tests

  • Proven that tests pass when they have to pass.
  • Proven that tests fail when they have to fail.
  • Python codebase satisfies PEP-8 style style guide. pycodestyle --max-line-length=120 --show-source --show-pep8 file.py

Regards.

@BraulioV BraulioV merged commit 0891569 into master Feb 16, 2021
@BraulioV BraulioV deleted the 1020-fix-vuln-tables branch February 16, 2021 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No such table: VULNERABILITIES when launching scan vulnerabilities test in a new environment
2 participants