Skip to content

Commit

Permalink
remove bad decleration
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Crawford <[email protected]>
  • Loading branch information
stephen-crawford committed Aug 11, 2023
1 parent 5479019 commit d2b7519
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

import java.io.IOException;
import java.net.InetAddress;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Collections;
import static java.util.Collections.emptyList;
Expand Down Expand Up @@ -94,7 +93,6 @@ public class ExtensionsManagerTests extends OpenSearchTestCase {
private NodeClient client;
private MockNioTransport transport;
private IdentityService identityService;
private Path extensionDir;

private final ThreadPool threadPool = new TestThreadPool(ExtensionsManagerTests.class.getSimpleName());
private final Settings settings = Settings.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

package org.opensearch.extensions.rest;

import org.opensearch.OpenSearchException;
import org.opensearch.common.settings.Settings;
import org.opensearch.core.rest.RestStatus;
import org.opensearch.OpenSearchParseException;
Expand Down Expand Up @@ -141,31 +140,6 @@ public void testExtensionRestRequest() throws Exception {
}
}

public void testExtensionRestRequestWithNoIdentityToken() throws Exception {
ExtensionRestRequest request = new ExtensionRestRequest(
expectedMethod,
expectedUri,
expectedPath,
expectedParams,
expectedHeaders,
expectedContentType,
expectedContent,
null,
expectedHttpVersion
);

OpenSearchParseException ex = assertThrows(
OpenSearchParseException.class,
() -> request.contentParser(NamedXContentRegistry.EMPTY)
);
assertTrue(ex.getMessage().contains("There is no request body or the requester identity is invalid."));

try (BytesStreamOutput out = new BytesStreamOutput()) {
OpenSearchException ex2 = assertThrows(OpenSearchException.class, () -> request.writeTo(out));
assertEquals("Principal identifier token is null", ex2.getMessage());
}
}

public void testExtensionRestRequestWithNoContent() throws Exception {
ExtensionRestRequest request = new ExtensionRestRequest(
expectedMethod,
Expand Down

0 comments on commit d2b7519

Please sign in to comment.