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

Windows | Build failing at junits #880

Open
nishneo opened this issue Apr 7, 2022 · 2 comments
Open

Windows | Build failing at junits #880

nishneo opened this issue Apr 7, 2022 · 2 comments
Labels
good first issue Good for newcomers

Comments

@nishneo
Copy link

nishneo commented Apr 7, 2022

Expected Behaviour

Build should be successful

Actual Behaviour

Build fail at junits

Reproduce Scenario (including but not limited to)

mvn clean install at master branch for 2.7.1-SNAPSHOT

Steps to Reproduce

Checkout code and build using mvn clean install

Platform and Version

Windows

Logs taken while reproducing problem

ERROR] Errors:
[ERROR] CommerceLinksTransformerTest.testTransformerDisabled:158 ▒ InvalidPath Illegal...
[INFO]
[ERROR] Tests run: 626, Failures: 0, Errors: 1, Skipped: 0
[INFO]

17:18:04.761 [main] INFO c.a.c.c.c.c.i.s.CommerceLinksTransformerFactory - Commerce links transformer enabled.
17:18:05.095 [main] INFO c.a.c.c.c.c.i.s.CommerceLinksTransformerFactory - Commerce links transformer disabled.
[ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.477 s <<< FAILURE! - in com.adobe.cq.commerce.core.components.internal.services.CommerceLinksTransformerTest
[ERROR] testTransformerDisabled(com.adobe.cq.commerce.core.components.internal.services.CommerceLinksTransformerTest) Time elapsed: 0.22 s <<< ERROR!
java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/Users/anupatel/Desktop/Unilever/cif-core-components/aem-core-cif-components/bundles/core/target/test-classes/rewriter/ciflinks.html
at com.adobe.cq.commerce.core.components.internal.services.CommerceLinksTransformerTest.testTransformerDisabled(CommerceLinksTransformerTest.java:158)

@Buuhuu Buuhuu added the good first issue Good for newcomers label Apr 12, 2022
@Buuhuu
Copy link
Contributor

Buuhuu commented Apr 12, 2022

This would require inlining the html from the ciflinks.html into the java class. Please feel free to provide a pull request for this.

@kkaushik2002
Copy link

kkaushik2002 commented Aug 16, 2022

@Buuhuu I have gone through the code base of java.
can you please help me with changes..
// verify transformed HTML
String transformedHtml = writer.toString();

    Path filePath = Paths.get(classLoader.getResource(TEST_HTML).getPath());
	
    String originalHtml = Files.lines(filePath).collect(Collectors.joining(System.lineSeparator()));

    assertTrue(transformedHtml.endsWith(originalHtml));

Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants