Skip to content

Commit

Permalink
Test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Stwissel committed Feb 22, 2024
1 parent 9e1cd2d commit 9aefeb3
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 5 deletions.
57 changes: 57 additions & 0 deletions .classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="target/generated-sources/annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
34 changes: 34 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>mkdocs-version-processor</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
<filteredResources>
<filter>
<id>1708628092138</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Create and maintain a container (a.k.a. Docker) image having all [MKDocs Materia

## Multi-Version build

The image now contains our [mkdocs-preprocessor](preporcessor.md) which allows to comfortably maintain documentation versions for software version without duplicating sources.
The image now contains our [mkdocs-preprocessor](preprocessor.md) which allows to comfortably maintain documentation versions for software version without duplicating sources.

## Build result

Expand Down
4 changes: 2 additions & 2 deletions src/test/java/com/hcl/mkdocs/MkDocsPreprocessorTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ static void testProcessFiles() throws IOException {
void checkForExpecetFiles(final String pathString) {
final Path p = Path.of(pathString, "");
System.out.println(p.toAbsolutePath());
Assertions.assertTrue(p.toFile().exists());
Assertions.assertTrue(p.toFile().exists(), p.toString());
}

@ParameterizedTest
@CsvFileSource(resources = "/e2eFilesThatShouldNotExist.csv")
void ensureNoRougeVersion(final String shouldNotExistString) {
final Path p = Path.of(shouldNotExistString, "");
System.out.println(p.toAbsolutePath());
Assertions.assertFalse(p.toFile().exists());
Assertions.assertFalse(p.toFile().exists(), p.toString());
}
}
2 changes: 0 additions & 2 deletions src/test/resources/e2eExpectedFiles.csv
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
target/e2e/mkdocs.yml
target/e2e/theme_overrides/sample.css
target/e2e/docs/assets/test.txt
target/e2e/docs/v1/test/.pages
target/e2e/docs/v2/test/.pages
target/e2e/docs/v3/test/.pages
target/e2e/docs/v1/info/.pages
target/e2e/docs/v2/info/.pages
Expand Down

0 comments on commit 9aefeb3

Please sign in to comment.