Dry up getting cluster admin client in tests (#96952)

Drying this up further and adding the same short-cut for single node
tests. Dealing with most of the spots that I could grab via automatic
refactorings.
This commit is contained in:
Armin Braun 2023-06-22 14:27:23 +02:00 committed by GitHub
parent 75a68e18e7
commit dd7d381922
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
203 changed files with 730 additions and 1246 deletions

View file

@ -39,7 +39,7 @@ public class StoredExpressionIT extends ESIntegTestCase {
}
public void testAllOpsDisabledIndexedScripts() throws IOException {
client().admin().cluster().preparePutStoredScript().setId("script1").setContent(new BytesArray("""
clusterAdmin().preparePutStoredScript().setId("script1").setContent(new BytesArray("""
{"script": {"lang": "expression", "source": "2"} }"""), XContentType.JSON).get();
client().prepareIndex("test").setId("1").setSource("{\"theField\":\"foo\"}", XContentType.JSON).get();
try {