Agree with Jiajie. You can consider writing the sample private key into a temp file at the beginning of your test, and clean it once it is done.
XD On Thu, Mar 7, 2019 at 14:57 jiajie zhong <zhongjiajie...@hotmail.com> wrote: > Due to this file just use it unittest, I think the best way is to generate > it in test file, maybe you could see > > https://github.com/apache/airflow/blob/68c66a1f8ae2398bbf9999c8b9556fbf72b7becb/tests/hooks/test_hive_hook.py#L358-L361 > > https://github.com/apache/airflow/blob/68c66a1f8ae2398bbf9999c8b9556fbf72b7becb/tests/hooks/test_hive_hook.py#L390 > for inspiration > > ________________________________ > > Hi All, > > I opened AIRFLOW-4031 <https://issues.apache.org/jira/browse/AIRFLOW-4031> > and > I'm working on the pull request for this feature. In a nutshell, I'm adding > the ability to specify the location of the private key to use when > authenticating to snowflake instead of username and password. > > I created a unit test for this, but I need to have a couple of sample/fake > private key files for it to load. Where is the proper place to put these > files? I didn't see anything similar in the source tree. I was thinking > about putting them in tests/contrib/hooks/data but I wanted to check with > this list first and see what the best practice is. > > Thanks! > -- > Frank Maritato >