Tests: Change rest test extension from .yaml to .yml (#24659)
This commit renames all rest test files to use the .yml extension instead of .yaml. This way the extension used within all of elasticsearch for yaml is consistent.
This commit is contained in:
parent
d74760c306
commit
2a65bed243
|
@ -296,7 +296,7 @@ public class RestTestsFromSnippetsTask extends SnippetsTask {
|
||||||
Path dest = outputRoot().toPath().resolve(test.path)
|
Path dest = outputRoot().toPath().resolve(test.path)
|
||||||
// Replace the extension
|
// Replace the extension
|
||||||
String fileName = dest.getName(dest.nameCount - 1)
|
String fileName = dest.getName(dest.nameCount - 1)
|
||||||
dest = dest.parent.resolve(fileName.replace('.asciidoc', '.yaml'))
|
dest = dest.parent.resolve(fileName.replace('.asciidoc', '.yml'))
|
||||||
|
|
||||||
// Now setup the writer
|
// Now setup the writer
|
||||||
Files.createDirectories(dest.parent)
|
Files.createDirectories(dest.parent)
|
||||||
|
|
|
@ -535,7 +535,7 @@ public class InstallPluginCommandTests extends ESTestCase {
|
||||||
Path pluginDir = createPluginDir(temp);
|
Path pluginDir = createPluginDir(temp);
|
||||||
Path configDir = pluginDir.resolve("config");
|
Path configDir = pluginDir.resolve("config");
|
||||||
Files.createDirectory(configDir);
|
Files.createDirectory(configDir);
|
||||||
Files.createFile(configDir.resolve("custom.yaml"));
|
Files.createFile(configDir.resolve("custom.yml"));
|
||||||
String pluginZip = createPluginUrl("fake", pluginDir);
|
String pluginZip = createPluginUrl("fake", pluginDir);
|
||||||
installPlugin(pluginZip, env.v1());
|
installPlugin(pluginZip, env.v1());
|
||||||
assertPlugin("fake", pluginDir, env.v2());
|
assertPlugin("fake", pluginDir, env.v2());
|
||||||
|
@ -545,19 +545,19 @@ public class InstallPluginCommandTests extends ESTestCase {
|
||||||
Tuple<Path, Environment> env = createEnv(fs, temp);
|
Tuple<Path, Environment> env = createEnv(fs, temp);
|
||||||
Path envConfigDir = env.v2().configFile().resolve("fake");
|
Path envConfigDir = env.v2().configFile().resolve("fake");
|
||||||
Files.createDirectories(envConfigDir);
|
Files.createDirectories(envConfigDir);
|
||||||
Files.write(envConfigDir.resolve("custom.yaml"), "existing config".getBytes(StandardCharsets.UTF_8));
|
Files.write(envConfigDir.resolve("custom.yml"), "existing config".getBytes(StandardCharsets.UTF_8));
|
||||||
Path pluginDir = createPluginDir(temp);
|
Path pluginDir = createPluginDir(temp);
|
||||||
Path configDir = pluginDir.resolve("config");
|
Path configDir = pluginDir.resolve("config");
|
||||||
Files.createDirectory(configDir);
|
Files.createDirectory(configDir);
|
||||||
Files.write(configDir.resolve("custom.yaml"), "new config".getBytes(StandardCharsets.UTF_8));
|
Files.write(configDir.resolve("custom.yml"), "new config".getBytes(StandardCharsets.UTF_8));
|
||||||
Files.createFile(configDir.resolve("other.yaml"));
|
Files.createFile(configDir.resolve("other.yml"));
|
||||||
String pluginZip = createPluginUrl("fake", pluginDir);
|
String pluginZip = createPluginUrl("fake", pluginDir);
|
||||||
installPlugin(pluginZip, env.v1());
|
installPlugin(pluginZip, env.v1());
|
||||||
assertPlugin("fake", pluginDir, env.v2());
|
assertPlugin("fake", pluginDir, env.v2());
|
||||||
List<String> configLines = Files.readAllLines(envConfigDir.resolve("custom.yaml"), StandardCharsets.UTF_8);
|
List<String> configLines = Files.readAllLines(envConfigDir.resolve("custom.yml"), StandardCharsets.UTF_8);
|
||||||
assertEquals(1, configLines.size());
|
assertEquals(1, configLines.size());
|
||||||
assertEquals("existing config", configLines.get(0));
|
assertEquals("existing config", configLines.get(0));
|
||||||
assertTrue(Files.exists(envConfigDir.resolve("other.yaml")));
|
assertTrue(Files.exists(envConfigDir.resolve("other.yml")));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testConfigNotDir() throws Exception {
|
public void testConfigNotDir() throws Exception {
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue