Title
#code-review
theopolis

theopolis

01/28/2021, 5:14 PM
would love some help https://github.com/osquery/osquery/pull/6919 (adding more tests)
zwass

zwass

01/28/2021, 5:19 PM
gotcha
s

seph

01/28/2021, 5:37 PM
If the intent is to test with multiple versions of rpm database, I’d love to make it more clear how to add them.
5:43 PM
But I’m also not sure I understand
queryRpmDb
, it looks like it’s operating on the rpm db, vs something integration style of calling query against the table
theopolis

theopolis

01/28/2021, 6:39 PM
Can you guys leave notes on the PR? The intent of the PR is to test that the RPM APIs work. For context some assumptions about the API change in the newer librpm versions and our current integration tests do not catch this since they only run on debian machines. Adding a RPM-based integration test machine is also a good idea but IMO a unit-style test that runs everywhere is the best.
6:40 PM
And yeap, the code is written to support more tests easily. Right now we only support 1 type of RPM database. When I bump the librpm version we will have the ability to support a few more, and I will add more tests. 🙂
6:41 PM
It will look like this: • Add single test for the single type of RPM db • Bump librpm and continue to support a single type of db • Change a config option in how we build librpm to support sqlite and dbn types and add tests for these
s

seph

01/28/2021, 6:51 PM
Do you think it makes sense to test the API (as you’re doing) vs querying a test distributed database?