-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests leave key in keyring #1639
base: master
Are you sure you want to change the base?
Tests leave key in keyring #1639
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! Next up would be KWallet. We use the dbus daemon exposed by KWallet. Refer to the Qt DBus docs how to use dbus via qt. You will have to do some research to find a documentation of set kwallet daemon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, it works. Where did you find the removeEntry
dbus method? Next up would be MacOS support which is quite hard without access to a Mac. We use the PyObj-C bridge allowing access to MacOS native libraries. You can refer to the apple developer docs.
I'll try macOS today. |
Added for macOS:
|
fd26575
to
cfd0ebf
Compare
That's bad you just removed the commits containing MacOS support. |
cfd0ebf
to
6afdbbc
Compare
Hey I'm really sorry how can this be fixed now? |
Rebased and pushed it again. Please be careful with force-push and use it only when really needed. |
And when you do use |
…revadi/vorta into Test-leave-key-in-keyring
when you update a branch changed by other people |
should |
For macOS-related stuff it's needed because some libraries aren't available on linux (pyobjc). In this case it could be due to circular dependencies. Needs to be reviewed. If no issues, put it at the start of the file, where it belongs. |
I tried adding it above but its failing the pre-commit run! |
As always, nobody can help you if you just say that it failed. You will have to provide more details. The error/complaint message is a minimum. |
I have imported the |
55e6de6
to
ac42825
Compare
…revadi/vorta into Test-leave-key-in-keyring
This means that the repo url and password that are generated in the test has to be removed and only to be generated in the fixture and then used in multiple tests . Same question for |
Repo URL and password are generated by the fixture. The password manager entry is also removed by the fixture during cleanup. |
@m3nu I've tried implementing pytest fixture as per your suggestion , but the tests are failing. Need some help here! |
tests/test_repo.py
Outdated
@@ -116,8 +110,6 @@ def test_repo_add_success(qapp, qtbot, mocker, borg_json_output, keyring_fixture | |||
keyring = VortaKeyring.get_keyring() | |||
assert keyring.get_password("vorta-repo", RepoModel.get(id=2).url) == LONG_PASSWORD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gives me a assertion error here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case you should debug the test and see why it fails. Looking at the compared values would be a first good step.
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Are you still working on this @ganeshrevadi? This would be a big quality of life improvement for developers. |
@real-yfprojects Hey I'm currently not working on this! |
Adding
remove password
abstract method in abc.py and implementing in secretstorage.py.@real-yfprojects