rhevm-qe-automation / pytest_jira

py.test plugin to integrate with JIRA
GNU General Public License v2.0
29 stars 25 forks source link

Jira fixture #77

Closed liiight closed 7 years ago

liiight commented 7 years ago

Added jira fixture

To do:

liiight commented 7 years ago

I kinda fucked up with the rebase... Honestly, I don't know why am I still allowed to do that 😛

codecov-io commented 7 years ago

Codecov Report

Merging #77 into master will increase coverage by 0.06%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #77      +/-   ##
==========================================
+ Coverage   98.27%   98.34%   +0.06%     
==========================================
  Files           1        1              
  Lines         174      181       +7     
==========================================
+ Hits          171      178       +7     
  Misses          3        3
Impacted Files Coverage Δ
pytest_jira.py 98.34% <100%> (+0.06%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 477ee55...3c537ea. Read the comment docs.

liiight commented 7 years ago

I added a note to support passing the same kwargs as the marker (mainly run) but when i think about it, it doesn't make sense to do so, since the fixture is used within the test. Fixture should probably just return a boolean, nothing else. what do you think @lukas-bednar ?

lukas-bednar commented 7 years ago

I added a note to support passing the same kwargs as the marker (mainly run) but when i think about it, it doesn't make sense to do so, since the fixture is used within the test. Fixture should probably just return a boolean, nothing else. what do you think @lukas-bednar ?

Yes I think boolean is sufficient. Thank you for PR!

liiight commented 7 years ago

Currently the plugin returns bool if the plugin was successfully loaded (and according to the issue) status, but returns None if the plugin was not loaded.You think that's sufficient? Should we optionally raise an exception or something if the plugin isn't loaded?

I'm worried about false positives that can occur from simple jira connectivity issues. Maybe something like:

assert not jira_issue("ORG-1382", check_connection=True)

That will fail the test or raise an exception?

KKoukiou commented 7 years ago

@liiight I see what you mean by the false positive in case of the fixture returning None. I think we should not bother about it. Return value is very clear in the docs you provided and whoever uses it should handle the return values correctly.

liiight commented 7 years ago

Cool, thanks guys