Skip to content
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

login1: add methods to get session/user properties #409

Merged
merged 1 commit into from
Sep 16, 2022

Conversation

ilyam8
Copy link
Contributor

@ilyam8 ilyam8 commented Aug 30, 2022

This PR adds context-aware methods to get a property/all properties for a user or session.

I am not sure how to unit-test them, the majority of login1 connection methods have no unit tests. I think it will be possible after #396 (will be possible to mock both dbus.Conn and dbus.BusObject).

login1/dbus.go Outdated Show resolved Hide resolved
login1/dbus.go Outdated Show resolved Hide resolved
@lucab
Copy link
Contributor

lucab commented Aug 31, 2022

Thanks for the patch! I left some comments in review. Feel free to squash the commits when you think you are done, and I'll have a further look.

@lucab
Copy link
Contributor

lucab commented Aug 31, 2022

Indeed, this logic doesn't have much unit-testing coverage, as that really doesn't add much.
The test suite does a bit of integration testing, which is harder to balance though.
I think the tests that you added as sanity checks do make sense.

@ilyam8 ilyam8 force-pushed the feat_login1_methods_to_get_properties branch from 5020cdb to d3e99ab Compare August 31, 2022 18:07
@ilyam8
Copy link
Contributor Author

ilyam8 commented Aug 31, 2022

@lucab, thanks for the quick review 🙋‍♂️ I believe I've addressed all your comments.

@ilyam8 ilyam8 changed the title feat(login1): add methods to get session/user properties login1: add methods to get session/user properties Aug 31, 2022
Copy link
Contributor

@lucab lucab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the patch!

@lucab lucab merged commit 87ca09f into coreos:main Sep 16, 2022
@ilyam8 ilyam8 deleted the feat_login1_methods_to_get_properties branch September 16, 2022 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants