-
Notifications
You must be signed in to change notification settings - Fork 10
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
Update validateUILayouts logic #21
Conversation
0f771f3
to
f36e6ae
Compare
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.
I really like this one, it’s clean (I have some suggestions/requests for more thoughts on the naming), but the validation function is really what I was thinking about.
I think the testing though needs to be digged in: having more use cases and, in particular, more precise one, not linking with the layout we support, because apart from "type" (which is one of the case to tests, the rest is free form, and we can reflect what we are testing in the input name.
c4d3e68
to
8b896ea
Compare
Ok, so I think you missed 2 comments that are addressable right now, and if I get you right, you prefer to have pr 22 landed before doing the test changes (even if I don’t forsee any conflicts TBH, looking at both), correct? |
4423285
to
97cdc33
Compare
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.
excellent! As said, I love the fixes and in particular the new mock test approach which is independent of the layout type. I have some minor comments that should be easy to address!
.../testdata/TestGetAuthenticationModes/golden/get_authentication_modes_and_generate_validators
Show resolved
Hide resolved
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.
One the test case being clarified, feel free to stash and merge! This is way better :)
We used to have a static verification for the UI layouts returned by the broker, but those are subject to change according to what the system can currently handle. This means that it's up to PAM to provide which layouts are supported, which fields of those layouts are required and what values those fields support. This replaces the previous static implementation of validateUILayouts to a dinamic one that takes into consideration what was specified by PAM.
Since this a private function only called in GetAuthenticationModes, we need to export it to avoid having to call GAM in the SelectAuthenticationMode tests. We also added a helper to translate the validators into a JSON-like string to help with the tests.
f8cbb0f
to
28f75c9
Compare
28f75c9
to
5c4a1dc
Compare
We used to have a static verification for the UI layouts returned by the broker, but those are subject to change according to what the system can currently handle. This means that it's up to PAM to provide which layouts are supported, which fields of those layouts are required and what values those fields support.
This replaces the previous static implementation of validateUILayouts with a dynamic one that takes into consideration what was specified by PAM.
UDENG-1166