-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/add test cd #63
base: development
Are you sure you want to change the base?
Conversation
…user updated than update in the script
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.
thanks @idelcano
I have found some issues about quality of the code to review. I've added comments in the code
clonedInvalidTemplateAuthorities = copyObject(permissionFixerInvalidTemplateGroupsExtended); | ||
}); | ||
|
||
function getMetadataConfig(): PermissionFixerMetadataConfig { |
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.
This function is not necessary and generate noise, you can use the variable direcly
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.
All fixed
} | ||
|
||
function getMetataConfiThrowInvalidUsergroupException(): PermissionFixerMetadataConfig { | ||
return configThrowInvalidUsergroupException; |
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.
This function is not necessary and generate noise, you can use the variable direcly
} | ||
|
||
function getMetataConfigWithExcludedUser(): PermissionFixerMetadataConfig { | ||
return configWithUserExcluded; |
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.
This function is not necessary and generate noise, you can use the variable direcly
} | ||
|
||
function getWrongMinimalUserGroupConfig(): PermissionFixerMetadataConfig { | ||
return configWithWrongMinimalGroup; |
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.
This function is not necessary and generate noise, you can use the variable direcly
} | ||
|
||
function getValidUser(): PermissionFixerUser { | ||
return clonedValidUser; |
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.
This function is not necessary and generate noise, you can use the variable direcly
} | ||
|
||
function getInvalidUser(): PermissionFixerUser { | ||
return clonedInvalidUser; |
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.
This function is not necessary and generate noise, you can use the variable direcly
} | ||
|
||
function getUserWithoutGroup(): PermissionFixerUser { | ||
return clonedFakeUserWithoutGroup; |
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.
This function is not necessary and generate noise, you can use the variable direcly
); | ||
return useCase; | ||
} | ||
function givenBasicConfigRepository() { |
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.
There are a lot of similar functions here where the unique difference is the return when mockedRepository.get() is invoked, You can create a unique function and pass by parameter the data to return.
📌 References
📝 Implementation
Added some test for user-permission script (In this case we change a bit the workflow and I did a manual test also to be sure that nothing is broken).
We could continue adding test due has a lot of corner case to test.
📹 Screenshots/Screen capture
🔥 Notes to the tester
yarn start usermonitoring run-permissions-fixer --config-file config.json