Skip to content

Commit

Permalink
TIKA-4320 -- clean up opensearch integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tballison committed Oct 16, 2024
1 parent cc7a206 commit 32b00f9
Show file tree
Hide file tree
Showing 9 changed files with 181 additions and 299 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,6 @@
<name>Apache Tika OpenSearch integration tests</name>

<dependencies>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>tika-app</artifactId>
Expand All @@ -65,8 +55,9 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<groupId>org.opensearch</groupId>
<artifactId>opensearch-testcontainers</artifactId>
<version>2.1.1</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down

This file was deleted.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.tika.pipes.xsearch.tests;
package org.apache.tika.pipes.opensearch.tests;

import java.io.BufferedReader;
import java.io.IOException;
Expand All @@ -41,16 +41,16 @@
* This expands on the OpenSearchClient for testing purposes.
* This has more functionality than is needed for sending docs to OpenSearch
*/
public class XSearchTestClient extends OpenSearchClient {
public class OpensearchTestClient extends OpenSearchClient {

public XSearchTestClient(String openSearchUrl, HttpClient httpClient,
OpenSearchEmitter.AttachmentStrategy attachmentStrategy,
OpenSearchEmitter.UpdateStrategy updateStrategy,
String embeddedFileFieldName) {
public OpensearchTestClient(String openSearchUrl, HttpClient httpClient,
OpenSearchEmitter.AttachmentStrategy attachmentStrategy,
OpenSearchEmitter.UpdateStrategy updateStrategy,
String embeddedFileFieldName) {
super(openSearchUrl, httpClient, attachmentStrategy, updateStrategy, embeddedFileFieldName);
}

protected JsonResponse putJson(String url, String json) throws IOException {
public JsonResponse putJson(String url, String json) throws IOException {
HttpPut httpRequest = new HttpPut(url);
ByteArrayEntity entity = new ByteArrayEntity(json.getBytes(StandardCharsets.UTF_8));
httpRequest.setEntity(entity);
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@
<connectionTimeout>10000</connectionTimeout>
<socketTimeout>60000</socketTimeout>
<includeRouting>{INCLUDE_ROUTING}</includeRouting>
<userName>admin</userName>
<password>admin</password>
<userName>{OPENSEARCH_USERNAME}</userName>
<password>{OPENSEARCH_PASSWORD}</password>
</pipesReporter>
</async>
<fetchers>
Expand All @@ -101,8 +101,8 @@
<idField>_id</idField>
<connectionTimeout>10000</connectionTimeout>
<socketTimeout>60000</socketTimeout>
<userName>admin</userName>
<password>admin</password>
<userName>{OPENSEARCH_USERNAME}</userName>
<password>{OPENSEARCH_PASSWORD}</password>
</emitter>
</emitters>
<pipesIterator class="org.apache.tika.pipes.pipesiterator.fs.FileSystemPipesIterator">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@
specific language governing permissions and limitations
under the License.
-->
<Configuration status="INFO">
<Configuration>
<Appenders>
<Console name="console" target="SYSTEM_ERR">
<PatternLayout
pattern="%-5p [%t] %d{HH:mm:ss,SSS} %c %m%n" />
</Console>
</Appenders>
<Loggers>
<Root level="info" additivity="false">
<!-- turn off logging for the forked processes -->
<Root level="fatal" additivity="false">
<AppenderRef ref="console" />
</Root>
</Loggers>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.tika.parser.apple;

import java.nio.file.Path;
import java.nio.file.Paths;

import org.junit.jupiter.api.Test;

import org.apache.tika.TikaTest;

public class IWorkTest extends TikaTest {

@Test
public void testBasic() throws Exception {
Path p = Paths.get("/home/tallison/Downloads/Apple_key_file/keynotecreated.key");
}
}

0 comments on commit 32b00f9

Please sign in to comment.