#161 Is test suite passing?
Closed: Invalid 6 years ago Opened 6 years ago by pingou.

I was looking at a way to query for waivers having just a list of subjects (and potentially a product_version, but that seems entirely optional).

So I ran into: https://pagure.io/waiverdb/blob/master/f/waiverdb/api_v1.py#_376-379 which I removed.
Then, looked further in the code, that seems to support not providing a testcase (so was there a reason to make it mandatory?)

From there, I wanted to add tests for this change and I ran into: https://pagure.io/waiverdb/blob/master/f/tests/test_api_v10.py#_309 which seems to do exactly what I want and successfully.

But I don't see how this test can pass with what is in the code presently (cf first link). So I've been trying, avail so far, to run the waiverdb's test suite.

Could someone run the test suite as well?


How did you try?

λ tox -e py36                                                                                                     devel/waiverdb master
========================================================= test session starts ==========================================================
platform linux -- Python 3.6.5, pytest-3.5.0, py-1.5.3, pluggy-0.6.0
rootdir: /home/threebean/devel/waiverdb, inifile:
collected 57 items

tests/test_api_v10.py .............................                                                                              [ 50%]
tests/test_app.py ..                                                                                                             [ 54%]
tests/test_auth.py ........                                                                                                      [ 68%]
tests/test_cli.py ...............                                                                                                [ 94%]
tests/test_events.py ..                                                                                                          [ 98%]
tests/test_model.py .                                                                                                            [100%]

====================================================== 57 passed in 1.58 seconds =======================================================
_______________________________________________________________ summary ________________________________________________________________
  py36: commands succeeded
  congratulations :)

As to your question, I think the code you were looking at was for a POST endpoint, but the test is testing a GET endpoint.

You are correct, I didn't put the correct link: https://pagure.io/waiverdb/blob/master/f/waiverdb/api_v1.py#_123-126

The fact that the tests are passing make me very curious :s

Lines 123-126 are just making sure that if the 'testcase' key is present, it's a str. Not entirely sure why, i guess just thoroughness, because the queryparser schema thingy we have is not capable of looking inside the structure of the 'results' list to make sure it matches what we are expecting.

The 'testcase' key is not required though, as that test case demonstrates.

Could you take it back a step and explain what you want to achieve? I am already a bit lost in this issue, sorry...

@dcallagh basically I was working on trying to get bodhi to display if an update has been waived or not, so there is something in the UI that indicates to packagers that their waiver was recorded and make it easier for admins to track down why an update got through.

With the information I have now I think I'll be able to come up with something, thanks all for your help.

I will close this ticket as invalid as it pretty much was entirely invalid :)

Metadata Update from @pingou:
- Issue close_status updated to: Invalid

6 years ago

When trying to run the test suite I keep running into:

E       sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) FATAL:  role "pingou" does not exist
E        (Background on this error at: http://sqlalche.me/e/e3q8)

Am I missing something?

A while back we changed the tests to run against Postgres. They expect to have super on Postgres running on localhost. There are some quick hints in the README about how to configure this. DId you try those?

Judging by the error, you might just need this step:

$ sudo -u postgres createuser --superuser $USER

Or if you don't like the idea of doing that, you can also tweak the DATABASE_URI to point elsewhere instead.

Login to comment on this ticket.

Metadata