remove deprecated krbV support
Fixes: https://pagure.io/koji/issue/1991
This commit is contained in:
parent
ee93da4177
commit
f8419e3626
25 changed files with 30 additions and 552 deletions
|
|
@ -12,31 +12,6 @@ from koji.xmlrpcplus import Fault
|
|||
|
||||
|
||||
class TestClientSession(unittest.TestCase):
|
||||
|
||||
@mock.patch('socket.getfqdn')
|
||||
def test_server_principal_rdns(self, getfqdn):
|
||||
opts = {'krb_rdns': True}
|
||||
session = koji.ClientSession('http://koji.example.com:30/kojihub', opts)
|
||||
cprinc = mock.MagicMock()
|
||||
cprinc.realm = "REALM"
|
||||
getfqdn.return_value = 'koji02.example.com'
|
||||
|
||||
princ = session._serverPrincipal(cprinc)
|
||||
self.assertEqual(princ, 'host/koji02.example.com@REALM')
|
||||
getfqdn.assert_called_with('koji.example.com')
|
||||
|
||||
@mock.patch('socket.getfqdn')
|
||||
def test_server_principal_no_rdns(self, getfqdn):
|
||||
opts = {'krb_rdns': False}
|
||||
session = koji.ClientSession('http://koji.example.com/kojihub', opts)
|
||||
cprinc = mock.MagicMock()
|
||||
cprinc.realm = "REALM"
|
||||
getfqdn.return_value = 'koji02.example.com'
|
||||
|
||||
princ = session._serverPrincipal(cprinc)
|
||||
self.assertEqual(princ, 'host/koji.example.com@REALM')
|
||||
getfqdn.assert_not_called()
|
||||
|
||||
@mock.patch('requests.Session')
|
||||
def test_new_session(self, rsession):
|
||||
koji.ClientSession('http://koji.example.com/kojihub')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue