42
42
import java .util .HashSet ;
43
43
import java .util .List ;
44
44
import java .util .Locale ;
45
+ import java .util .Map ;
45
46
import java .util .Set ;
46
47
import java .util .concurrent .CountDownLatch ;
47
48
import java .util .concurrent .TimeUnit ;
@@ -200,6 +201,7 @@ public void testDeleteClusterMetadata() throws IOException {
200
201
.nodeId ("nodeA" )
201
202
.opensearchVersion (VersionUtils .randomOpenSearchVersion (random ()))
202
203
.previousClusterUUID (ClusterState .UNKNOWN_UUID )
204
+ .clusterStateCustomMetadataMap (Map .of ("snapshots" , new UploadedMetadataAttribute ("snapshots" , "snapshot_file1" )))
203
205
.committed (true )
204
206
.build ();
205
207
ClusterMetadataManifest manifest2 = ClusterMetadataManifest .builder (manifest1 )
@@ -209,10 +211,12 @@ public void testDeleteClusterMetadata() throws IOException {
209
211
.coordinationMetadata (coordinationMetadata )
210
212
.templatesMetadata (templateMetadata )
211
213
.settingMetadata (settingMetadata )
214
+ .clusterStateCustomMetadataMap (Map .of ("restore" , new UploadedMetadataAttribute ("restore" , "restore_file1" )))
212
215
.build ();
213
216
ClusterMetadataManifest manifest3 = ClusterMetadataManifest .builder (manifest2 )
214
217
.indices (List .of (index1UpdatedMetadata , index2Metadata ))
215
218
.settingMetadata (settingMetadataUpdated )
219
+ .clusterStateCustomMetadataMap (Map .of ())
216
220
.build ();
217
221
218
222
UploadedIndexMetadata index3Metadata = new UploadedIndexMetadata ("index3" , "indexUUID3" , "index_metadata3__2" );
@@ -286,6 +290,7 @@ public void testDeleteClusterMetadata() throws IOException {
286
290
)
287
291
);
288
292
verify (container ).deleteBlobsIgnoringIfNotExists (List .of (getFormattedIndexFileName (index1Metadata .getUploadedFilePath ())));
293
+ verify (container ).deleteBlobsIgnoringIfNotExists (List .of ("restore_file1" , "snapshot_file1" ));
289
294
Set <String > staleManifest = new HashSet <>();
290
295
inactiveBlobs .forEach (
291
296
blob -> staleManifest .add (
0 commit comments