diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/doc/RestTestsFromSnippetsTask.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/doc/RestTestsFromSnippetsTask.groovy index 61a07f4fbd4..fc7604ad1fd 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/doc/RestTestsFromSnippetsTask.groovy +++ b/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:") diff --git a/test/framework/src/main/java/org/elasticsearch/test/rest/yaml/FileUtils.java b/test/framework/src/main/java/org/elasticsearch/test/rest/yaml/FileUtils.java index caaa8b2ec83..4519953819a 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/rest/yaml/FileUtils.java +++ b/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 filesSet = files.get(groupName); if (filesSet == null) { filesSet = new HashSet<>();