|
3 | 3 | * SPDX-License-Identifier: Apache-2.0
|
4 | 4 | */
|
5 | 5 |
|
6 |
| -package org.opensearch.indexmanagement |
| 6 | +package org.opensearch.indexmanagement.security |
7 | 7 |
|
8 | 8 | import org.junit.After
|
9 | 9 | import org.junit.Before
|
10 | 10 | import org.opensearch.action.admin.indices.alias.IndicesAliasesRequest
|
11 | 11 | import org.opensearch.client.ResponseException
|
12 | 12 | import org.opensearch.client.RestClient
|
13 | 13 | import org.opensearch.commons.rest.SecureRestClientBuilder
|
14 |
| -import org.opensearch.indexmanagement.IndexManagementPlugin.Companion.INDEX_MANAGEMENT_INDEX |
| 14 | +import org.opensearch.indexmanagement.BULK_WRITE_INDEX |
| 15 | +import org.opensearch.indexmanagement.CREATE_INDEX |
| 16 | +import org.opensearch.indexmanagement.GET_INDEX_MAPPING |
| 17 | +import org.opensearch.indexmanagement.IndexManagementPlugin |
| 18 | +import org.opensearch.indexmanagement.MANAGED_INDEX |
| 19 | +import org.opensearch.indexmanagement.PUT_INDEX_MAPPING |
| 20 | +import org.opensearch.indexmanagement.SEARCH_INDEX |
| 21 | +import org.opensearch.indexmanagement.SecurityRestTestCase |
| 22 | +import org.opensearch.indexmanagement.WRITE_INDEX |
15 | 23 | import org.opensearch.indexmanagement.indexstatemanagement.action.AliasAction
|
16 | 24 | import org.opensearch.indexmanagement.indexstatemanagement.model.Policy
|
17 | 25 | import org.opensearch.indexmanagement.indexstatemanagement.model.State
|
18 | 26 | import org.opensearch.indexmanagement.indexstatemanagement.randomErrorNotification
|
19 | 27 | import org.opensearch.indexmanagement.indexstatemanagement.transport.action.explain.ExplainAction
|
20 | 28 | import org.opensearch.rest.RestStatus
|
21 |
| -import org.opensearch.test.OpenSearchTestCase |
22 | 29 | import org.opensearch.test.junit.annotations.TestLogging
|
23 | 30 | import java.time.Instant
|
24 | 31 | import java.time.temporal.ChronoUnit
|
@@ -65,13 +72,13 @@ class ExplainSecurityBehaviorIT : SecurityRestTestCase() {
|
65 | 72 | deleteUser(ismUser)
|
66 | 73 | deleteRole(HELPDESK_ROLE)
|
67 | 74 |
|
68 |
| - deleteIndexByName("$INDEX_MANAGEMENT_INDEX") |
| 75 | + deleteIndexByName("${IndexManagementPlugin.INDEX_MANAGEMENT_INDEX}") |
69 | 76 | }
|
70 | 77 |
|
71 | 78 | fun `test managed index explain indices permission check`() {
|
72 | 79 |
|
73 |
| - val notPermittedIndexPrefix = OpenSearchTestCase.randomAlphaOfLength(10).lowercase(Locale.getDefault()) |
74 |
| - val policyId = OpenSearchTestCase.randomAlphaOfLength(10) |
| 80 | + val notPermittedIndexPrefix = randomAlphaOfLength(10).lowercase(Locale.getDefault()) |
| 81 | + val policyId = randomAlphaOfLength(10) |
75 | 82 |
|
76 | 83 | val permittedindices = mutableListOf<String>()
|
77 | 84 | val notPermittedindices = mutableListOf<String>()
|
|
0 commit comments