kiwy42 commented on pull request #17816:
URL: https://github.com/apache/airflow/pull/17816#issuecomment-906171952
@potiuk I've tried to add some tests, but my knowledge on how to verify if
option is effective or not is limited so I probably won't be able to do better
than that in `test/security/kerberos.py`:
```
# Validate forwardable kerberos option
@conf_vars({('kerberos', 'keytab'):
KRB5_KTNAME,('kerberos','forwardable'): ''})
def test_renew_from_kt_forwardable_empty(self):
"""
We expect no result, but a successful run.
"""
assert renew_from_kt(principal=self.args.principal,
keytab=self.args.keytab) is None
@conf_vars({('kerberos', 'keytab'):
KRB5_KTNAME,('kerberos','forwardable'): 'False'})
def test_renew_from_kt_forwardable_false(self):
"""
We expect no result, but a successful run.
"""
assert renew_from_kt(principal=self.args.principal,
keytab=self.args.keytab) is None
@conf_vars({('kerberos', 'keytab'):
KRB5_KTNAME,('kerberos','forwardable'): 'True'})
def test_renew_from_kt_forwardable_true(self):
"""
We expect no result, but a successful run.
"""
assert renew_from_kt(principal=self.args.principal,
keytab=self.args.keytab) is None
```
It's nothing too fancy but at least validate that my option do not disrupt
regular operation.
@mik-laj I will try to edit documentation accordingly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]