Skip to content
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

Merged
merged 2 commits into from
Sep 10, 2022

Conversation

enapps-enorman
Copy link
Contributor

No description provided.

@sonarcloud
Copy link

sonarcloud bot commented Sep 9, 2022

@enapps-enorman enapps-enorman merged commit f7361d4 into apache:master Sep 10, 2022
@enapps-enorman enapps-enorman deleted the issue/SLING-11571 branch September 10, 2022 20:57

@Test
public void removeMixinFromNotExistingPath() throws Exception {
// this should just log a warning and continue
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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");
Copy link
Member

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.

Copy link
Contributor Author

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");
Copy link
Member

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

Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants