kernelci / kcidb

kernelci.org common database tools
GNU General Public License v2.0
27 stars 33 forks source link

Switch from mocking to actual databases/deployments #377

Open spbnick opened 1 year ago

spbnick commented 1 year ago

Now that we have fixtures for actual databases and deployments (in conftest.py), switch the test_*_main tests using Mock across the project to using the fixtures instead. Use test_query and test_email_generated for reference.

However, exercise caution when using deployment fixture, as those take quite a while to cleanup, and too many tests using that would make the overall run even longer. Alternatively, consider introducing a "half-way cleaned" fixture for tests requiring only a part of the deployment, which would take a shorter cleanup.

octonawish-akcodes commented 1 year ago

Can I work on this one.

spbnick commented 1 year ago

Of course! Take it slowly, though, start with just one test you find easiest, and ask for help on our channel, if you get stuck.

spbnick commented 1 year ago

Removing @octonawish-akcodes from this issue, as he'd like to pick another one instead.

spbnick commented 1 year ago

A good start on this issue would be to start with tests that only require a database (either "clean" or "empty"), since those don't require access to Google Cloud.

NikkyXO commented 1 year ago

@spbnick okay..i can try working on this

spbnick commented 1 year ago

Great! Assigning :)

danghai commented 1 year ago

I am very happy to see Nick still mentoring many people. I am one of the people that @spbnick has helped a lot during my days of learning to code and contributing to open source. I believe that Nick is one of the best teachers in the world that I admire. I have learned a lot from him from the first commits with very detailed and meticulous comments and feedback. I believe that with Nick's help, you will become great engineers in the future. Thank you Nick again. 👍

NikkyXO commented 1 year ago

I am very happy to see Nick still mentoring many people. I am one of the people that @spbnick has helped a lot during my days of learning to code and contributing to open source. I believe that Nick is one of the best teachers in the world that I admire. I have learned a lot from him from the first commits with very detailed and meticulous comments and feedback. I believe that with Nick's help, you will become great engineers in the future. Thank you Nick again. 👍

Yeah. He is very good teacher 😊. He is quite inspiring and seems to know a lot. I really do hope that one day, I can know as much he does. I'm also getting quite comfortable with my git commits. Hoping to make good use of this learning opportunity