-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow Errata HTTP client to work without Kerberos credentials
If credentials are not specified, the HTTP method returns None without querying the endpoint. This change was made because the Errata Kerberos credentials are not yet prepared and the gathered information is not yet necessary. This unusual feature should be removed in the future.
- Loading branch information
Showing
4 changed files
with
39 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,9 +86,21 @@ def koji_test_backend(fake_koji, koji_dir): | |
|
||
@pytest.fixture(autouse=True) | ||
def fake_kerberos_auth(mocker): | ||
mocker.patch( | ||
"pushsource._impl.backend.errata_source." | ||
"errata_http_client.ErrataHTTPClient.create_kerberos_ticket" | ||
) | ||
mocker.patch("gssapi.Name") | ||
mocker.patch("gssapi.Credentials.acquire") | ||
mocker.patch("requests_gssapi.HTTPSPNEGOAuth", return_value=None) | ||
with patch.dict( | ||
"os.environ", | ||
{ | ||
"PUSHSOURCE_ERRATA_KEYTAB_PATH": "/path/to/keytab", | ||
"PUSHSOURCE_ERRATA_PRINCIPAL": "[email protected]", | ||
}, | ||
): | ||
yield | ||
|
||
|
||
@pytest.fixture(autouse=True) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters