Use plaintext keyring backend in test#7209
Conversation
|
CI seems to be very unhappy works for you locally? |
No. Didn't try b/c I didn't have the interactive issue to begin with. |
|
I'll try to set the config file for |
|
Ok, different approach, @yarikoptic : Setting the to be used backend to |
|
sounds good, especially because apparently that is what I ended up doing in debian package: |
by patching `os.environ` from within `conftest.py:setup_package` in order to not have the keyring asking for a password in order to be created in non-interactive (CI-) test runs. (Closes datalad#6623)
Codecov ReportBase: 88.89% // Head: 90.92% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## maint #7209 +/- ##
==========================================
+ Coverage 88.89% 90.92% +2.02%
==========================================
Files 355 355
Lines 46674 46695 +21
Branches 6351 6355 +4
==========================================
+ Hits 41493 42456 +963
+ Misses 5166 4224 -942
Partials 15 15
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
|
Redone, env var is now patched in setup_package instead of needing to be provided. Should fix #6623 and possibly make your debian patch superfluous. Can you confirm, that #7165 also is addressed? IIRC, @TheChymera had to deal with that issue as well, right? |
|
confirming success -- thank you @bpoldrack ! |
|
PR released in |
|
I have adjusted the PR title to match its actual content |
It runs unconditionally and verifies that no test leave a keyring (credential store) modification behind. The fixture assums the present datalad-core keyring setup, which configures a plaintext backend for all tests datalad/datalad#7209 Ping datalad/datalad#7297
…to be used during tests We hardcoded to set it to a plain text keyring in d8d538a of datalad#7209 to completely disable possible attempt of keyring to interact with user e.g. to establish a new keyring. That was done to address datalad#6623 which came up during debian package building. But the need for older behavior was realized while approaching datalad#7340 where interactions with s3 were replaced to use boto3 but to test I needed credentials, but we were just skipping the tests since credentials were not present in that fake keyring. With this patch I could run DATALAD_TESTS_CREDENTIALS=system python3 -m pytest -s -v datalad/downloaders/tests/test_s3.py and see tests to interact with S3. Test relating to NDA were failing since most likely NDA broke the "flow" of how to access data there.
Trying to fix #6623 and possibly #7165 by using MemoryKeyring with this test.
@yarikoptic Provided CI is happy to begin with, could you please give it a try?