-
Notifications
You must be signed in to change notification settings - Fork 22
Respect SKIP_SETTING_JIRA_FIELDS environment variable #375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,7 @@ def mocked_env(): | |
| flexmock(os).should_receive("getenv").with_args("JIRA_URL").and_return("http://jira") | ||
| flexmock(os).should_receive("getenv").with_args("JIRA_TOKEN").and_return("12345") | ||
| flexmock(os).should_receive("getenv").with_args("DRY_RUN", "False").and_return("false") | ||
| flexmock(os).should_receive("getenv").with_args("SKIP_SETTING_JIRA_FIELDS", "False").and_return("false") | ||
nforro marked this conversation as resolved.
Show resolved
Hide resolved
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While this change correctly mocks the new environment variable for existing tests, the new functionality itself is not tested. A new test case should be added to verify that when |
||
|
|
||
|
|
||
| @pytest.mark.asyncio | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checking for boolean environment variables by comparing to just
'true'can be brittle, as users might intuitively use other truthy values like'1'or'yes'. It's more robust to check against a set of common truthy string values. This improvement could also be applied to theDRY_RUNcheck that follows.