Skip to content

Commit

Permalink
Removes tests from this branch to create a separate PR
Browse files Browse the repository at this point in the history
Signed-off-by: Darshit Chanpura <[email protected]>
  • Loading branch information
DarshitChanpura committed Dec 7, 2023
1 parent e96410c commit 4e83fe7
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 1,132 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ public class SecurityRestTestCase extends OpenSearchRestTestCase {

private static final String CERT_FILE_DIRECTORY = "sanity-tests/";

static boolean useAdminAsPassword = false;

private boolean isHttps() {
return System.getProperty("https").equals("true");
}
Expand Down Expand Up @@ -90,7 +88,7 @@ protected RestClient buildClient(Settings settings, HttpHost[] hosts) throws IOE

// create client with passed user
String userName = System.getProperty("user");
String password = useAdminAsPassword ? "admin" : System.getProperty("password");
String password = System.getProperty("password");

return new SecureRestClientBuilder(hosts, isHttps(), userName, password).setSocketTimeout(60000)
.setConnectionRequestTimeout(180000)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@
import org.hamcrest.MatcherAssert;
import org.junit.Test;

import org.opensearch.client.Request;
import org.opensearch.client.Response;

import static org.hamcrest.Matchers.anEmptyMap;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasItem;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not;
Expand All @@ -38,13 +34,6 @@ public void testSecurityPluginInstallation() throws Exception {
verifyPluginInstallationOnAllNodes();
}

@Test
public void testAdminCredentials_customStrongPassword_shouldSucceed() throws Exception {
Response response = client().performRequest(new Request("GET", ""));
MatcherAssert.assertThat(response.getStatusLine().getStatusCode(), is(equalTo(200)));
MatcherAssert.assertThat(response.getStatusLine().getReasonPhrase(), is(equalTo("OK")));
}

private void verifyPluginInstallationOnAllNodes() throws Exception {

Map<String, Map<String, Object>> nodesInCluster = (Map<String, Map<String, Object>>) getAsMapByAdmin("_nodes").get("nodes");
Expand Down

This file was deleted.

Loading

0 comments on commit 4e83fe7

Please sign in to comment.