Skip to content

Fix mocking in kerberos integration test - #40042

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:fix-mocking-in-kerberos-tests
Jun 4, 2024
Merged

potiuk merged 1 commit into
apache:mainfrom
potiuk:fix-mocking-in-kerberos-tests

Conversation

@potiuk

@potiuk potiuk commented Jun 4, 2024

Copy link
Copy Markdown
Member

The new requests-kerberos has a slightly different approach for parsing urls and extracting hostname from url causes a problem with "mock cannot be compared to int" when mock is returned as URL.

This PR fixes it by hard-coding returned URL in the mock that is being returned in this case.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

The new requests-kerberos has a slightly different approach for
parsing urls and extracting hostname from url causes a problem with
"mock cannot be compared to int" when mock is returned as URL.

This PR fixes it by hard-coding returned URL in the mock that is
being returned in this case.
@potiuk
potiuk merged commit 32fd29d into apache:main Jun 4, 2024
@potiuk
potiuk deleted the fix-mocking-in-kerberos-tests branch June 4, 2024 08:02
ephraimbuddy pushed a commit that referenced this pull request Jun 5, 2024
The new requests-kerberos has a slightly different approach for
parsing urls and extracting hostname from url causes a problem with
"mock cannot be compared to int" when mock is returned as URL.

This PR fixes it by hard-coding returned URL in the mock that is
being returned in this case.

(cherry picked from commit 32fd29d)
fdemiane pushed a commit to fdemiane/airflow that referenced this pull request Jun 6, 2024
The new requests-kerberos has a slightly different approach for
parsing urls and extracting hostname from url causes a problem with
"mock cannot be compared to int" when mock is returned as URL.

This PR fixes it by hard-coding returned URL in the mock that is
being returned in this case.
syedahsn pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Jun 7, 2024
The new requests-kerberos has a slightly different approach for
parsing urls and extracting hostname from url causes a problem with
"mock cannot be compared to int" when mock is returned as URL.

This PR fixes it by hard-coding returned URL in the mock that is
being returned in this case.
romsharon98 pushed a commit to romsharon98/airflow that referenced this pull request Jul 26, 2024
The new requests-kerberos has a slightly different approach for
parsing urls and extracting hostname from url causes a problem with
"mock cannot be compared to int" when mock is returned as URL.

This PR fixes it by hard-coding returned URL in the mock that is
being returned in this case.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants