Skip to content

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

Merged
lucab merged 1 commit into
coreos:mainfrom
ilyam8:feat_login1_methods_to_get_properties
Sep 16, 2022
Merged

login1: add methods to get session/user properties#409
lucab merged 1 commit into
coreos:mainfrom
ilyam8:feat_login1_methods_to_get_properties

Conversation

@ilyam8

@ilyam8 ilyam8 commented Aug 30, 2022

Copy link
Copy Markdown
Contributor

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).

Comment thread login1/dbus.go Outdated
Comment thread login1/dbus.go Outdated
@lucab

lucab commented Aug 31, 2022

Copy link
Copy Markdown
Contributor

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

lucab commented Aug 31, 2022

Copy link
Copy Markdown
Contributor

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

ilyam8 commented Aug 31, 2022

Copy link
Copy Markdown
Contributor Author

@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

@lucab lucab left a comment

Copy link
Copy Markdown
Contributor

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.

2 participants