test: fix forbidden api failure

Original commit: elastic/x-pack-elasticsearch@ec8c6e1d51
This commit is contained in:
Martijn van Groningen 2015-04-28 12:37:41 +02:00
parent fcb81ab76a
commit 59218733ea

View File

@ -16,6 +16,7 @@ import org.elasticsearch.watcher.test.WatcherTestUtils;
import org.elasticsearch.watcher.transport.actions.put.PutWatchResponse;
import org.junit.Test;
import java.net.URISyntaxException;
import java.util.Map;
import static org.elasticsearch.common.settings.ImmutableSettings.settingsBuilder;
@ -39,8 +40,12 @@ public class TransformSearchTests extends AbstractWatcherIntegrationTests {
@Override
public Settings nodeSettings(int nodeOrdinal) {
//Set path so ScriptService will pick up the test scripts
return settingsBuilder().put(super.nodeSettings(nodeOrdinal))
.put("path.conf", TransformSearchTests.class.getResource("/config").getPath()).build();
try {
return settingsBuilder().put(super.nodeSettings(nodeOrdinal))
.put("path.conf", TransformSearchTests.class.getResource("/config").toURI().getPath()).build();
} catch (URISyntaxException e) {
throw new RuntimeException(e);
}
}
@Test