File tree Expand file tree Collapse file tree 2 files changed +1
-15
lines changed
Expand file tree Collapse file tree 2 files changed +1
-15
lines changed Original file line number Diff line number Diff line change 4343BASIC_LOGGER = logging .getLogger (name = "basic" )
4444
4545
46- @pytest .hookimpl (tryfirst = True )
47- def pytest_configure (config : Config ) -> None :
48- """Migrate PYTEST_JIRA_TOKEN to PYTEST_JIRA_PASSWORD for Basic Auth compatibility.
49-
50- The pytest-jira plugin uses PYTEST_JIRA_TOKEN for Bearer auth, which fails on
51- Atlassian Cloud. Migrating to PYTEST_JIRA_PASSWORD ensures both the plugin and
52- utilities/jira.py use Basic Auth instead.
53- """
54- jira_token = os .environ .get ("PYTEST_JIRA_TOKEN" )
55- if jira_token and not os .environ .get ("PYTEST_JIRA_PASSWORD" ):
56- os .environ ["PYTEST_JIRA_PASSWORD" ] = jira_token
57- del os .environ ["PYTEST_JIRA_TOKEN" ]
58-
59-
6046def pytest_addoption (parser : Parser ) -> None :
6147 aws_group = parser .getgroup (name = "AWS" )
6248 buckets_group = parser .getgroup (name = "Buckets" )
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ def get_jira_connection() -> JIRA:
2424 """
2525 return JIRA (
2626 server = os .getenv ("PYTEST_JIRA_URL" ),
27- basic_auth = (os .getenv ("PYTEST_JIRA_USERNAME" ), os .getenv ("PYTEST_JIRA_PASSWORD " )),
27+ basic_auth = (os .getenv ("PYTEST_JIRA_USERNAME" ), os .getenv ("PYTEST_JIRA_TOKEN " )),
2828 )
2929
3030
You can’t perform that action at this time.
0 commit comments