Skip to content

Commit 662a01c

Browse files
committed
fix: undo the changes in conftest.py and jira.py
Signed-off-by: Debarati Basu-Nag <dbasunag@redhat.com>
1 parent 46b4762 commit 662a01c

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

conftest.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,6 @@
4343
BASIC_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-
6046
def pytest_addoption(parser: Parser) -> None:
6147
aws_group = parser.getgroup(name="AWS")
6248
buckets_group = parser.getgroup(name="Buckets")

utilities/jira.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)