refactor: CCP-5381 clean up store issues - #663
Draft
WalterMoar wants to merge 1 commit into
Draft
Conversation
|
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.



Description
While cleaning up the unit tests for the stores there are many improvement items coming up, including:
groupApiDatauseGroupStore.addGroupcallsupsertGroup, but it only ever does an insertuseGroupStore.addGroupUsershould do API call and mapping together, then do something with the model objectuseGroupStore.removeGroupUsershould check that the user is in the group before removing, and throw an error if it doesn’t existuseGroupStore.updateGroupRolesshould be renamed toupdateGroupServiceRolesuseGroupStore.updateGroupRolesshould update the store with the data returned by the service, not the data from the useruseGroupStore.updateGroupRolestsdocs say that an error is thrown but this is not trueuseGroupStore.updateGroupRolesis peculiar in that it deals withGroupServicesbut the API isServicesuseGroupStore.updateGroupRolestest suite needs to be fixed up, but not too much point until the code is fixeduseServiceStore.addServiceToTenantdoesn’t update the store, so fix it and then unskip the testuseServiceStore.createServicecallsupsertService, but it only ever does an insertuseServiceStore.fetchServicesdoes an upsert of the API data, which does not remove services, so it should just replace the array. Fix it and unskip the testuseTenantRequestStore.updateTenantRequestStatusdoes not update the name in the store. This bug may be visible to the useruseTenantRequestStore.updateTenantRequestStatusignores the update if the tenant request id is not found. Is this right?Type of change
refactor: a code change that neither fixes a bug nor adds a featureChecklist
Thanks for the PR!
Deployments, as required, will be available below:
Please create PRs in draft mode. Mark as ready to enable:
After merge, new images are deployed in: