Skip to content

Commit 8037a97

Browse files
committed
test remote publication in bwc test
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
1 parent 6f1b59e commit 8037a97

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

qa/rolling-upgrade/build.gradle

+6
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ for (Version bwcVersion : BuildParams.bwcVersions.wireCompatible) {
6262
setting 'repositories.url.allowed_urls', 'http://snapshot.test*'
6363
setting 'path.repo', "${buildDir}/cluster/shared/repo/${baseName}"
6464
setting 'http.content_type.required', 'true'
65+
setting 'node.attr.remote_store.routing_table.repository', 'my-fs-repository'
66+
setting 'node.attr.remote_store.state.repository', 'my-fs-repository'
67+
setting 'node.attr.remote_store.repository.my-fs-repository.type', 'fs'
68+
setting 'node.attr.remote_store.repository.my-fs-repository.settings.location', "${buildDir}/cluster/shared/repo/remote_state"
69+
setting 'cluster.remote_store.state.enabled', 'true'
70+
setting 'cluster.remote_store.publication.enabled', 'true'
6571
}
6672
}
6773

qa/rolling-upgrade/src/test/java/org/opensearch/upgrades/ClusterStateIT.java

+15
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,21 @@
1414
import java.util.Map;
1515

1616
public class ClusterStateIT extends AbstractRollingTestCase{
17+
@SuppressWarnings("unchecked")
18+
public void testRemotePublicationEnabled() throws Exception {
19+
Request getSettingRequest = new Request("GET", "/_cluster/settings");
20+
getSettingRequest.addParameter("include_defaults", "true");
21+
Response response = client().performRequest(getSettingRequest);
22+
assertOK(response);
23+
Map<String, Object> responseMap = entityAsMap(response);
24+
Map<String, Object> persistentSettings = (Map<String, Object>) responseMap.get("persistent");
25+
assertEquals("true", persistentSettings.get("cluster.remote_store.publication.enabled"));
26+
Map<String, Object> transientSettings = (Map<String, Object>) responseMap.get("transient");
27+
assertEquals("true", transientSettings.get("cluster.remote_store.publication.enabled"));
28+
Map<String, Object> defaultsSettings = (Map<String, Object>) responseMap.get("defaults");
29+
assertEquals("true", defaultsSettings.get("cluster.remote_store.publication.enabled"));
30+
}
31+
1732
public void testTemplateMetadataUpgrades() throws Exception {
1833
if (CLUSTER_TYPE == ClusterType.OLD) {
1934
String templateName = "my_template";

0 commit comments

Comments
 (0)