Fix test for Support trailing slashes on plugin _site URLs #2654

This commit is contained in:
David Pilato 2013-02-19 21:16:47 +01:00
parent 3b31c1216e
commit b7afa0f44e
1 changed files with 5 additions and 2 deletions

View File

@ -30,6 +30,8 @@ import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod; import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test; import org.testng.annotations.Test;
import java.io.File;
import static org.elasticsearch.common.settings.ImmutableSettings.settingsBuilder; import static org.elasticsearch.common.settings.ImmutableSettings.settingsBuilder;
import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.containsString;
@ -42,9 +44,10 @@ public class SitePluginTests extends AbstractNodesTests {
@BeforeClass @BeforeClass
public void setupPluginDirectory() { public void setupPluginDirectory() throws Exception {
File pluginDir = new File(SitePluginTests.class.getResource("/org/elasticsearch/test/integration/plugin").toURI());
putDefaultSettings(settingsBuilder() putDefaultSettings(settingsBuilder()
.put("path.plugins", "target/test-classes/org/elasticsearch/test/integration/plugin/") .put("path.plugins", pluginDir.getAbsolutePath())
.build()); .build());
} }