[7.x] [App Search] Role mappings migration part 2 (#94461)#94762
Merged
kibanamachine merged 1 commit intoelastic:7.xfrom Mar 16, 2021
Merged
[7.x] [App Search] Role mappings migration part 2 (#94461)#94762kibanamachine merged 1 commit intoelastic:7.xfrom
kibanamachine merged 1 commit intoelastic:7.xfrom
Conversation
* Add engines mock and fix mock role mapping The original asRoleMapping was merely for a smoke test in the shared component. Refactored to work better in App Search component * Add RoleMappingsLogic * Fix test description Co-authored-by: Jason Stoltzfus <jastoltz24@gmail.com> * Fix test description Co-authored-by: Jason Stoltzfus <jastoltz24@gmail.com> * Add flash messages when creating, updating or deleting * Add path and resetState calls Refactoring the tests showed me that some parts of the state weren’t being reset. * Refactor handleAuthProviderChange logic I some how got the test coverage at 100% with my wrong way of doing tests before (scary). When I fixed it I noticed that noting I could do would trigger the fallback of just returning the `[ANY_AUTH_PROVIDER]` array. After talking with Constance, we could not come up with a way to trigger it either, given the conditions. She had suggested removing the first return statement but that caused an empty array being returned sometimes. Ultimately, I was able to get it working and covered with these changes. * Refactor tests per PR feedback The places where `role: 'superuser’` was deleted in the listeners was a side effect of using `setRoleMappingData` and not `mount` * Add back deleted assertion * Copy nit Co-authored-by: Constance <constancecchen@users.noreply.github.com> Co-authored-by: Jason Stoltzfus <jastoltz24@gmail.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Constance <constancecchen@users.noreply.github.com>
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backports the following commits to 7.x: