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 failing WITH_CRYPT_SERVICE test #230

Merged
merged 6 commits into from
Aug 4, 2022
Merged

Fix failing WITH_CRYPT_SERVICE test #230

merged 6 commits into from
Aug 4, 2022

Conversation

aloisklink
Copy link
Contributor

Adds CI tests for linux-with-crypt.

After adding these tests, I found that the tests were failing, since the prepare_find_table function was failing to find the store database, due to an SQLITE_MISUSE error.

I did a bit of refactoring to simplify the function and add error handling and the function and tests seem to work now.

Draft until #227 is merged

Instead of having to make mock functions to fake a global_db,
we can use built-in SQLite functionality, see
[In-memory Databases And Shared Cache](https://www.sqlite.org/inmemorydb.html)
@aloisklink aloisklink added the bug Something isn't working label Aug 3, 2022
@codecov
Copy link

codecov bot commented Aug 3, 2022

Codecov Report

❗ No coverage uploaded for pull request base (main@93df35f). Click here to learn what that means.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #230   +/-   ##
=======================================
  Coverage        ?   45.56%           
=======================================
  Files           ?      108           
  Lines           ?    14949           
  Branches        ?        0           
=======================================
  Hits            ?     6811           
  Misses          ?     8138           
  Partials        ?        0           
Impacted Files Coverage Δ
src/utils/sqliteu.c 100.00% <100.00%> (ø)
tests/crypt/test_crypt_service.c 100.00% <100.00%> (ø)
tests/utils/test_sqliteu.c 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

This function was not working properly, as the step function
was returning SQLITE_MISUSE.
Adds some basic tests for src/utils/sqliteu.h
Copy link
Contributor

@mereacre mereacre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super. More tests.

@mereacre mereacre marked this pull request as ready for review August 4, 2022 13:54
@mereacre mereacre merged commit c904824 into main Aug 4, 2022
@mereacre mereacre deleted the ci-test-crypt-service branch August 4, 2022 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants