vorta icon indicating copy to clipboard operation
vorta copied to clipboard

Tests leave key in keyring.

Open real-yfprojects opened this issue 3 years ago • 1 comments

The issue was first brought up by @bastiencyr in #1065:

Only for dev, I just noticed that there are a lot of keys added in my repo manager which start by "vorta-test-repo...". I don't know if it is a bug but it would be nice for dev to provide a way to remove this tests repo. I have something like 650 entries 'vorta-test-repo...' in my default password manager (gnome-keyring) :(

To solve this issue, the keyring module of vorta needs a method to remove a key from the keyring. Currently I don't know of other uses of such a feature.

real-yfprojects avatar Mar 06 '22 13:03 real-yfprojects

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 10 '22 19:06 stale[bot]

Is this issue just refers to removing key =lambda k: k[1] from get_keyring() in vorta/src/vorta/keyring/abc.py @real-yfprojects

ganeshrevadi avatar Mar 05 '23 17:03 ganeshrevadi

Nope, see above and also this comment: https://github.com/borgbase/vorta/pull/1584#issuecomment-1418987171

Do you want to tackle this issue?

real-yfprojects avatar Mar 05 '23 18:03 real-yfprojects

I can work on the issue , I understand that their needs to be a method remove_password added in the abc.py and its implementation in corresponding files . Its a little complicated for me , if you could guide me through on how it work and what will be its usecases?

ganeshrevadi avatar Mar 07 '23 17:03 ganeshrevadi

I understand that their needs to be a method remove_password added in the abc.py and its implementation in corresponding files.

Yes, start with defining the abstract method signature in abc.py. Then implement it for each password provider and adjust the abstract signature as needed. I suggest you start with secretstorage and do MacOS last.

When that works you can write test coverage for the new function and use it to clean up existing tests.

Its a little complicated for me , if you could guide me through on how it work

No problem, I will do that. Just ask if run into an issue.

what will be its usecases?

Currently we'll only use it for cleaning up tests.

real-yfprojects avatar Mar 07 '23 19:03 real-yfprojects