Browse Source

Merge pull request #20239 from rjernst/docs_rest_debugging

Tests: Improve rest suite names and generated test names for docs tests
Ryan Ernst 9 years ago
parent
commit
459e3c15a6

+ 1 - 1
buildSrc/src/main/groovy/org/elasticsearch/gradle/doc/RestTestsFromSnippetsTask.groovy

@@ -117,7 +117,7 @@ public class RestTestsFromSnippetsTask extends SnippetsTask {
 
             if (false == test.continued) {
                 current.println('---')
-                current.println("\"$test.start\":")
+                current.println("\"line_$test.start\":")
             }
             if (test.skipTest) {
                 current.println("  - skip:")

+ 1 - 1
test/framework/src/main/java/org/elasticsearch/test/rest/yaml/FileUtils.java

@@ -155,7 +155,7 @@ public final class FileUtils {
             @Override
             public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
                 if (file.toString().endsWith(fileSuffix)) {
-                    String groupName = file.toAbsolutePath().getParent().getFileName().toString();
+                    String groupName = dir.relativize(file.getParent()).toString();
                     Set<Path> filesSet = files.get(groupName);
                     if (filesSet == null) {
                         filesSet = new HashSet<>();