@@ -209,6 +209,14 @@ public void whenExistingManagedPodSpecContainerHasWrongEnvFrom_replaceIt() {
209
209
verifyRollManagedPodWhen ((pod ) -> getSpecContainer (pod ).envFrom (Collections .emptyList ()));
210
210
}
211
211
212
+ @ Test
213
+ public void whenExistingManagedPodRestartVersionChange () {
214
+ verifyRollManagedPodWhen (
215
+ (pod ) ->
216
+ pod .getMetadata ()
217
+ .putLabelsItem (LabelConstants .SERVERRESTARTVERSION_LABEL , "serverRestartV1" ));
218
+ }
219
+
212
220
@ Test
213
221
public void whenDomainHasAdditionalVolumes_createManagedPodWithThem () {
214
222
getConfigurator ()
@@ -362,6 +370,24 @@ public void whenClusterHasLabels_createManagedPodWithThem() {
362
370
assertThat (podLabels , hasEntry ("label2" , "cluster-label-value2" ));
363
371
}
364
372
373
+ @ Test
374
+ public void whenClusterHasRestartVersion_createManagedPodWithRestartVersionLabel () {
375
+ testSupport .addToPacket (ProcessingConstants .CLUSTER_NAME , CLUSTER_NAME );
376
+ getConfigurator ().configureCluster (CLUSTER_NAME ).withRestartVersion ("clusterRestartV1" );
377
+
378
+ Map <String , String > podLabels = getCreatedPod ().getMetadata ().getLabels ();
379
+ assertThat (podLabels , hasEntry (LabelConstants .CLUSTERRESTARTVERSION_LABEL , "clusterRestartV1" ));
380
+ }
381
+
382
+ @ Test
383
+ public void whenDomainHasRestartVersion_createManagedPodWithRestartVersionLabel () {
384
+ testSupport .addToPacket (ProcessingConstants .CLUSTER_NAME , CLUSTER_NAME );
385
+ getConfigurator ().withRestartVersion ("domainRestartV1" );
386
+
387
+ Map <String , String > podLabels = getCreatedPod ().getMetadata ().getLabels ();
388
+ assertThat (podLabels , hasEntry (LabelConstants .DOMAINRESTARTVERSION_LABEL , "domainRestartV1" ));
389
+ }
390
+
365
391
@ Test
366
392
public void whenClusterHasAnnotations_createManagedPodWithThem () {
367
393
testSupport .addToPacket (ProcessingConstants .CLUSTER_NAME , CLUSTER_NAME );
0 commit comments