Skip to content

Commit

Permalink
[FLINK-9138][docs][tests] Make ConfigOptionsDocsCompletenessTest an I…
Browse files Browse the repository at this point in the history
…T case

This closes apache#5975.
  • Loading branch information
zentol committed May 10, 2018
1 parent 6d59870 commit d637a3a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
10 changes: 10 additions & 0 deletions flink-docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,16 @@ under the License.
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<rootDir>${rootDir}</rootDir>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>

<pluginManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
* the same key with different descriptions/default values), and that the documentation does not refer to non-existent
* options.
*/
public class ConfigOptionsDocsCompletenessTest {
public class ConfigOptionsDocsCompletenessITCase {

@Test
public void testDocsCompleteness() throws IOException, ClassNotFoundException {
Expand Down Expand Up @@ -99,7 +99,7 @@ public void testDocsCompleteness() throws IOException, ClassNotFoundException {
}

private static Map<String, DocumentedOption> parseDocumentedOptions() throws IOException {
Path includeFolder = Paths.get("..", "docs", "_includes", "generated").toAbsolutePath();
Path includeFolder = Paths.get(System.getProperty("rootDir"), "docs", "_includes", "generated").toAbsolutePath();
return Files.list(includeFolder)
.filter(path -> path.getFileName().toString().contains("configuration"))
.flatMap(file -> {
Expand Down Expand Up @@ -145,7 +145,7 @@ private static Map<String, ExistingOption> findExistingOptions() throws IOExcept
Map<String, ExistingOption> existingOptions = new HashMap<>(32);

for (OptionsClassLocation location : LOCATIONS) {
processConfigOptions("..", location.getModule(), location.getPackage(), optionsClass -> {
processConfigOptions(System.getProperty("rootDir"), location.getModule(), location.getPackage(), optionsClass -> {
List<ConfigOptionsDocGenerator.OptionWithMetaInfo> configOptions = extractConfigOptions(optionsClass);
for (ConfigOptionsDocGenerator.OptionWithMetaInfo option : configOptions) {
String key = option.option.key();
Expand Down

0 comments on commit d637a3a

Please sign in to comment.