Skip to content

Commit 587c566

Browse files
committed
Add tests for RemoteGlobalMetadataManager
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
1 parent a3402d1 commit 587c566

7 files changed

+554
-10
lines changed

server/src/test/java/org/opensearch/gateway/remote/RemoteGlobalMetadataManagerTests.java

Lines changed: 548 additions & 4 deletions
Large diffs are not rendered by default.

server/src/test/java/org/opensearch/gateway/remote/model/RemoteCoordinationMetadataTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ public void testSerDe() throws IOException {
229229
}
230230
}
231231

232-
private CoordinationMetadata getCoordinationMetadata() {
232+
public static CoordinationMetadata getCoordinationMetadata() {
233233
return CoordinationMetadata.builder()
234234
.term(TERM)
235235
.lastAcceptedConfiguration(new VotingConfiguration(Set.of("node1")))

server/src/test/java/org/opensearch/gateway/remote/model/RemoteCustomMetadataTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ public void testSerDe() throws IOException {
232232
}
233233
}
234234

235-
private Custom getCustomMetadata() {
235+
public static Custom getCustomMetadata() {
236236
return IndexGraveyard.builder().addTombstone(new Index("test-index", "3q2423")).build();
237237
}
238238

server/src/test/java/org/opensearch/gateway/remote/model/RemoteGlobalMetadataTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ public void testSerDe() throws IOException {
180180
}
181181
}
182182

183-
private Metadata getGlobalMetadata() {
183+
public static Metadata getGlobalMetadata() {
184184
return Metadata.builder()
185185
.templates(
186186
TemplatesMetadata.builder()

server/src/test/java/org/opensearch/gateway/remote/model/RemoteHashesOfConsistentSettingsTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ public void testSerDe() throws IOException {
185185
}
186186
}
187187

188-
private DiffableStringMap getHashesOfConsistentSettings() {
188+
public static DiffableStringMap getHashesOfConsistentSettings() {
189189
Map<String, String> hashesOfConsistentSettings = new HashMap<>();
190190
hashesOfConsistentSettings.put("secure-setting-key", "secure-setting-value");
191191
return new DiffableStringMap(hashesOfConsistentSettings);

server/src/test/java/org/opensearch/gateway/remote/model/RemotePersistentSettingsMetadataTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public void testSerDe() throws IOException {
224224
}
225225
}
226226

227-
private Settings getSettings() {
227+
public static Settings getSettings() {
228228
return Settings.builder().put("random_index_setting_" + randomAlphaOfLength(3), randomAlphaOfLength(5)).build();
229229
}
230230
}

server/src/test/java/org/opensearch/gateway/remote/model/RemoteTemplatesMetadataTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ public void testSerDe() throws IOException {
227227
}
228228
}
229229

230-
private TemplatesMetadata getTemplatesMetadata() {
230+
public static TemplatesMetadata getTemplatesMetadata() {
231231
return TemplatesMetadata.builder()
232232
.put(
233233
IndexTemplateMetadata.builder("template" + randomAlphaOfLength(3))

0 commit comments

Comments
 (0)