Skip to content

Commit 1af9daa

Browse files
author
Seung Yeon Joo
committed
Fixing IT
Signed-off-by: Seung Yeon Joo <seung.yeon.joo@oracle.com>
1 parent 5c7dd7c commit 1af9daa

File tree

3 files changed

+2
-33
lines changed

3 files changed

+2
-33
lines changed

build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,7 @@ integTest {
573573
excludeTestsMatching "org.opensearch.indexmanagement.indexstatemanagement.action.NotificationActionIT"
574574
}
575575
exclude 'org/opensearch/indexmanagement/indexstatemanagement/MetadataRegressionIT.class'
576+
exclude 'org/opensearch/indexmanagement/indexstatemanagement/ConvertIndexToRemoteIT.class'
576577
}
577578

578579
// TODO: raise issue in Core, this is because of the test framework
@@ -634,6 +635,7 @@ task integTestRemote(type: RestIntegTestTask) {
634635

635636
// Snapshot action integration tests rely on node level setting path.repo which we can't set remotely
636637
exclude 'org/opensearch/indexmanagement/indexstatemanagement/action/SnapshotActionIT.class'
638+
exclude 'org/opensearch/indexmanagement/indexstatemanagement/action/ConvertIndexToRemoteIT.class'
637639
}
638640

639641
// === Set up BWC tests ===

src/test/kotlin/org/opensearch/indexmanagement/indexstatemanagement/IndexStateManagementRestTestCase.kt

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -101,38 +101,6 @@ abstract class IndexStateManagementRestTestCase : IndexManagementRestTestCase()
101101
protected open fun enableValidationService() {
102102
updateValidationServiceSetting(true)
103103
}
104-
105-
protected fun createOrUpdateRole() {
106-
val roleBody = """
107-
{
108-
"cluster_permissions": ["cluster:admin/snapshot/restore", "cluster:admin/snapshot/create"],
109-
"index_permissions": [
110-
{
111-
"index_patterns": ["*"],
112-
"allowed_actions": ["indices:*"]
113-
}
114-
]
115-
}
116-
""".trimIndent()
117-
118-
client().makeRequest(
119-
method = "PUT",
120-
endpoint = "/_plugins/_security/api/roles/snapshot_restore_role",
121-
entity = StringEntity(roleBody, ContentType.APPLICATION_JSON),
122-
)
123-
124-
// Map your test user to snapshot_restore_role
125-
val roleMappingBody = """
126-
{
127-
"users": ["testUser"]
128-
}
129-
""".trimIndent()
130-
client().makeRequest(
131-
method = "PUT",
132-
endpoint = "/_plugins/_security/api/rolesmapping/snapshot_restore_role",
133-
entity = StringEntity(roleMappingBody, ContentType.APPLICATION_JSON),
134-
)
135-
}
136104
protected fun createPolicy(
137105
policy: Policy,
138106
policyId: String = OpenSearchTestCase.randomAlphaOfLength(10),

src/test/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/ConvertIndexToRemoteActionIT.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ class ConvertIndexToRemoteActionIT : IndexStateManagementRestTestCase() {
2121
private val testIndexName = javaClass.simpleName.lowercase(Locale.ROOT)
2222

2323
fun `test basic conversion to remote index`() {
24-
createOrUpdateRole()
2524
val indexName = "${testIndexName}_index_basic"
2625
val policyID = "${testIndexName}_policy_basic"
2726
val repository = "repository"

0 commit comments

Comments
 (0)