You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/08/26 07:41:53 UTC

[GitHub] [airflow] kiwy42 commented on pull request #17816: Pull Request #17342: add support to enable kinit options [-f|-F] and [-a|-A]

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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org