Skip to content

Commit

Permalink
Replace more instances
Browse files Browse the repository at this point in the history
Signed-off-by: Craig Perkins <[email protected]>
  • Loading branch information
cwperks committed Oct 29, 2024
1 parent ccd745d commit a01f297
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ abstract class IndexStateManagementRestTestCase : IndexManagementRestTestCase()
}

protected fun getManagedIndexConfigByDocId(id: String): ManagedIndexConfig? {
val response = client().makeRequest("GET", "$INDEX_MANAGEMENT_INDEX/_doc/$id")
val response = adminClient().makeRequest("GET", "$INDEX_MANAGEMENT_INDEX/_doc/$id")
assertEquals("Request failed", RestStatus.OK, response.restStatus())
val getResponse = GetResponse.fromXContent(createParser(jsonXContent, response.entity.content))
assertTrue("Did not find managed index config", getResponse.isExists)
Expand Down Expand Up @@ -911,7 +911,7 @@ abstract class IndexStateManagementRestTestCase : IndexManagementRestTestCase()
metadataId: String,
header: BasicHeader = BasicHeader(HttpHeaders.CONTENT_TYPE, "application/json"),
): TransformMetadata {
val response = client().makeRequest("GET", "$INDEX_MANAGEMENT_INDEX/_doc/$metadataId", null, header)
val response = adminClient().makeRequest("GET", "$INDEX_MANAGEMENT_INDEX/_doc/$metadataId", null, header)
assertEquals("Unable to get transform metadata $metadataId", RestStatus.OK, response.restStatus())

val parser = createParser(XContentType.JSON.xContent(), response.entity.content)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class IndexStateManagementRestApiIT : IndexStateManagementRestTestCase() {
fun `test mappings after policy creation`() {
createRandomPolicy()

val response = client().makeRequest("GET", "/$INDEX_MANAGEMENT_INDEX/_mapping")
val response = adminClient().makeRequest("GET", "/$INDEX_MANAGEMENT_INDEX/_mapping")
val parserMap =
createParser(XContentType.JSON.xContent(), response.entity.content).map() as Map<String, Map<String, Any>>
val mappingsMap = parserMap[INDEX_MANAGEMENT_INDEX]!!["mappings"] as Map<String, Any>
Expand Down Expand Up @@ -271,7 +271,7 @@ class IndexStateManagementRestApiIT : IndexStateManagementRestTestCase() {
}
""".trimIndent()
val response =
client().makeRequest(
adminClient().makeRequest(
"POST", "$INDEX_MANAGEMENT_INDEX/_search", emptyMap(),
StringEntity(request, ContentType.APPLICATION_JSON),
)
Expand Down

0 comments on commit a01f297

Please sign in to comment.