-
Notifications
You must be signed in to change notification settings - Fork 13
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
SLING-11571 repoinit: allow add or remove mixin types #36
SLING-11571 repoinit: allow add or remove mixin types #36
Conversation
Kudos, SonarCloud Quality Gate passed! |
|
||
@Test | ||
public void removeMixinFromNotExistingPath() throws Exception { | ||
// this should just log a warning and continue |
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.
FWIW you could use a LogCapture utility to verify logging, as done in https://github.com/apache/sling-org-apache-sling-graphql-core/blob/d430d47df5b190107d413f31ef19052aacab4d98/src/test/java/org/apache/sling/graphql/core/engine/DefaultQueryExecutorLoggingTest.java
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 for the review. I've incorporated the suggested change at: #38
U.parseAndExecute("create path /removeOneMixinOnOnePath(nt:unstructured mixin mix:lockable)"); | ||
U.assertNodeExists("/removeOneMixinOnOnePath", "nt:unstructured", Collections.singletonList("mix:lockable")); | ||
|
||
U.parseAndExecute("remove mixin mix:lockable from /removeOneMixinOnOnePath"); |
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 think If "remove mixin" always removed all mixins the current tests wouldn't catch that. I'd add two mixins initially and remove one after the other to make sure selective removing works.
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 for the review. I've incorporated the suggested change at: #38
U.assertNodeExists("/removeTwoMixinsOnOnePath1", "nt:unstructured", Arrays.asList("mix:lockable","mix:referenceable")); | ||
U.assertNodeExists("/removeTwoMixinsOnOnePath2", "nt:unstructured", Arrays.asList("mix:lockable","mix:referenceable")); | ||
|
||
U.parseAndExecute("remove mixin mix:lockable,mix:referenceable from /removeTwoMixinsOnOnePath1,/removeTwoMixinsOnOnePath2"); |
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.
Same comment as above about not testing selective removal of mixins
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 for the review. I've incorporated the suggested change at: #38
No description provided.