rhevm-qe-automation/pytest_jira

Enable plugin usage via --jira-enabled=true

liiight opened this issue · 2 comments

I'd like to have the option wether to use the plugin or not pass as an envvar in my CI. Currently this is possible either via manipulating the command arts via a bash script or using the PYTEST_ADDOPTS envvar. Both of these aren't nice.

I propose adding a --jira-enabled=true option, that will accompany the other existing flags as to not break compatibility.

If you like this I can put out a PR for this change.

WDYT?

I am worried about --jira flag, the presence or absence of this flag says whether to enable or disable this plugin.
This --jira-enable flags seems to be duplicate to me ... or I am overlooking something ?

hmm, using pytest's PYTEST_ADDOPTS seems nicer than I though:

$ PYTEST_ADDOPTS="--jira"
$ pytest

I was thinking using an explicit flag would be nicer though:

$ JIRA_ENABLED="true"
$ pytest --jira-enabled=$JIRA_ENABLED

But I guess it's a minor/not an issue...