Skip to content

Commit 3ed046a

Browse files
author
tazhate
committed
fix(tests): update Nethermind version in upgrade tests to match current default (1.36.1)
1 parent b03c439 commit 3ed046a

1 file changed

Lines changed: 22 additions & 22 deletions

File tree

internal/controller/upgrade_test.go

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ var _ = Describe("Upgrade Controller", func() {
190190
It("should detect image change and set Upgrading condition", func() {
191191
ctx := context.Background()
192192
name := fmt.Sprintf("test-upgrade-img-%d", time.Now().UnixNano())
193-
nn := setupAndReconcile(ctx, name, "nethermind/nethermind", "1.36.0")
193+
nn := setupAndReconcile(ctx, name, "nethermind/nethermind", "1.36.1")
194194
DeferCleanup(func() {
195195
n := &nodesv1alpha1.BlockchainNode{}
196196
if err := k8sClient.Get(ctx, nn, n); err == nil {
@@ -213,13 +213,13 @@ var _ = Describe("Upgrade Controller", func() {
213213
sts.Annotations[annotationLastClient] = "nethermind"
214214
Expect(k8sClient.Patch(ctx, sts, patch)).To(Succeed())
215215

216-
// Reconcile should detect the change (1.35.0 -> 1.36.0).
216+
// Reconcile should detect the change (1.35.0 -> 1.36.1).
217217
_, err := reconcileOnce(ctx, nn)
218218
Expect(err).NotTo(HaveOccurred())
219219

220220
// Verify the StatefulSet now has the new image annotation.
221221
Expect(k8sClient.Get(ctx, nn, sts)).To(Succeed())
222-
Expect(sts.Annotations[annotationLastImage]).To(Equal("nethermind/nethermind:1.36.0"))
222+
Expect(sts.Annotations[annotationLastImage]).To(Equal("nethermind/nethermind:1.36.1"))
223223

224224
// Verify the previous image was saved for rollback.
225225
Expect(sts.Annotations[annotationPreviousImage]).To(Equal("nethermind/nethermind:1.35.0"))
@@ -239,7 +239,7 @@ var _ = Describe("Upgrade Controller", func() {
239239
It("should not trigger restart when image is unchanged", func() {
240240
ctx := context.Background()
241241
name := fmt.Sprintf("test-upgrade-noop-%d", time.Now().UnixNano())
242-
nn := setupAndReconcile(ctx, name, "nethermind/nethermind", "1.36.0")
242+
nn := setupAndReconcile(ctx, name, "nethermind/nethermind", "1.36.1")
243243
DeferCleanup(func() {
244244
n := &nodesv1alpha1.BlockchainNode{}
245245
if err := k8sClient.Get(ctx, nn, n); err == nil {
@@ -257,7 +257,7 @@ var _ = Describe("Upgrade Controller", func() {
257257
if sts.Annotations == nil {
258258
sts.Annotations = map[string]string{}
259259
}
260-
sts.Annotations[annotationLastImage] = "nethermind/nethermind:1.36.0"
260+
sts.Annotations[annotationLastImage] = "nethermind/nethermind:1.36.1"
261261
sts.Annotations[annotationLastClient] = "nethermind"
262262
Expect(k8sClient.Patch(ctx, sts, patch)).To(Succeed())
263263

@@ -276,7 +276,7 @@ var _ = Describe("Upgrade Controller", func() {
276276
It("should detect client change as an upgrade trigger", func() {
277277
ctx := context.Background()
278278
name := fmt.Sprintf("test-upgrade-client-%d", time.Now().UnixNano())
279-
nn := setupAndReconcile(ctx, name, "nethermind/nethermind", "1.36.0")
279+
nn := setupAndReconcile(ctx, name, "nethermind/nethermind", "1.36.1")
280280
DeferCleanup(func() {
281281
n := &nodesv1alpha1.BlockchainNode{}
282282
if err := k8sClient.Get(ctx, nn, n); err == nil {
@@ -294,7 +294,7 @@ var _ = Describe("Upgrade Controller", func() {
294294
if sts.Annotations == nil {
295295
sts.Annotations = map[string]string{}
296296
}
297-
sts.Annotations[annotationLastImage] = "nethermind/nethermind:1.36.0"
297+
sts.Annotations[annotationLastImage] = "nethermind/nethermind:1.36.1"
298298
sts.Annotations[annotationLastClient] = "geth" // different client
299299
Expect(k8sClient.Patch(ctx, sts, patch)).To(Succeed())
300300

@@ -312,7 +312,7 @@ var _ = Describe("Upgrade Controller", func() {
312312
It("should detect crash loop and perform rollback", func() {
313313
ctx := context.Background()
314314
name := fmt.Sprintf("test-rollback-%d", time.Now().UnixNano())
315-
nn := setupAndReconcile(ctx, name, "nethermind/nethermind", "1.36.0")
315+
nn := setupAndReconcile(ctx, name, "nethermind/nethermind", "1.36.1")
316316
DeferCleanup(func() {
317317
n := &nodesv1alpha1.BlockchainNode{}
318318
if err := k8sClient.Get(ctx, nn, n); err == nil {
@@ -331,7 +331,7 @@ var _ = Describe("Upgrade Controller", func() {
331331
if sts.Annotations == nil {
332332
sts.Annotations = map[string]string{}
333333
}
334-
sts.Annotations[annotationLastImage] = "nethermind/nethermind:1.36.0"
334+
sts.Annotations[annotationLastImage] = "nethermind/nethermind:1.36.1"
335335
sts.Annotations[annotationLastClient] = "nethermind"
336336
sts.Annotations[annotationPreviousImage] = "nethermind/nethermind:1.35.0"
337337
Expect(k8sClient.Patch(ctx, sts, stsPatch)).To(Succeed())
@@ -357,7 +357,7 @@ var _ = Describe("Upgrade Controller", func() {
357357
Containers: []corev1.Container{
358358
{
359359
Name: "node",
360-
Image: "nethermind/nethermind:1.36.0",
360+
Image: "nethermind/nethermind:1.36.1",
361361
},
362362
},
363363
},
@@ -373,7 +373,7 @@ var _ = Describe("Upgrade Controller", func() {
373373
{
374374
Name: "node",
375375
RestartCount: 5,
376-
Image: "nethermind/nethermind:1.36.0",
376+
Image: "nethermind/nethermind:1.36.1",
377377
State: corev1.ContainerState{
378378
Waiting: &corev1.ContainerStateWaiting{
379379
Reason: "CrashLoopBackOff",
@@ -416,7 +416,7 @@ var _ = Describe("Upgrade Controller", func() {
416416
It("should not rollback when crash loop is from old image", func() {
417417
ctx := context.Background()
418418
name := fmt.Sprintf("test-no-rollback-%d", time.Now().UnixNano())
419-
nn := setupAndReconcile(ctx, name, "nethermind/nethermind", "1.36.0")
419+
nn := setupAndReconcile(ctx, name, "nethermind/nethermind", "1.36.1")
420420
DeferCleanup(func() {
421421
n := &nodesv1alpha1.BlockchainNode{}
422422
if err := k8sClient.Get(ctx, nn, n); err == nil {
@@ -434,7 +434,7 @@ var _ = Describe("Upgrade Controller", func() {
434434
if sts.Annotations == nil {
435435
sts.Annotations = map[string]string{}
436436
}
437-
sts.Annotations[annotationLastImage] = "nethermind/nethermind:1.36.0"
437+
sts.Annotations[annotationLastImage] = "nethermind/nethermind:1.36.1"
438438
sts.Annotations[annotationLastClient] = "nethermind"
439439
sts.Annotations[annotationPreviousImage] = "nethermind/nethermind:1.35.0"
440440
Expect(k8sClient.Patch(ctx, sts, stsPatch)).To(Succeed())
@@ -475,7 +475,7 @@ var _ = Describe("Upgrade Controller", func() {
475475
{
476476
Name: "node",
477477
RestartCount: 5,
478-
Image: "nethermind/nethermind:1.35.0", // OLD image, not 1.36.0
478+
Image: "nethermind/nethermind:1.36.0", // OLD image, not 1.36.1
479479
State: corev1.ContainerState{
480480
Waiting: &corev1.ContainerStateWaiting{
481481
Reason: "CrashLoopBackOff",
@@ -493,13 +493,13 @@ var _ = Describe("Upgrade Controller", func() {
493493

494494
// Verify NO rollback: last-image should still be the new version.
495495
Expect(k8sClient.Get(ctx, nn, sts)).To(Succeed())
496-
Expect(sts.Annotations[annotationLastImage]).To(Equal("nethermind/nethermind:1.36.0"))
496+
Expect(sts.Annotations[annotationLastImage]).To(Equal("nethermind/nethermind:1.36.1"))
497497
})
498498

499499
It("should handle rollback with no previous image gracefully", func() {
500500
ctx := context.Background()
501501
name := fmt.Sprintf("test-rollback-noprev-%d", time.Now().UnixNano())
502-
nn := setupAndReconcile(ctx, name, "nethermind/nethermind", "1.36.0")
502+
nn := setupAndReconcile(ctx, name, "nethermind/nethermind", "1.36.1")
503503
DeferCleanup(func() {
504504
n := &nodesv1alpha1.BlockchainNode{}
505505
if err := k8sClient.Get(ctx, nn, n); err == nil {
@@ -517,7 +517,7 @@ var _ = Describe("Upgrade Controller", func() {
517517
if sts.Annotations == nil {
518518
sts.Annotations = map[string]string{}
519519
}
520-
sts.Annotations[annotationLastImage] = "nethermind/nethermind:1.36.0"
520+
sts.Annotations[annotationLastImage] = "nethermind/nethermind:1.36.1"
521521
sts.Annotations[annotationLastClient] = "nethermind"
522522
// No annotationPreviousImage.
523523
Expect(k8sClient.Patch(ctx, sts, stsPatch)).To(Succeed())
@@ -541,7 +541,7 @@ var _ = Describe("Upgrade Controller", func() {
541541
},
542542
Spec: corev1.PodSpec{
543543
Containers: []corev1.Container{
544-
{Name: "node", Image: "nethermind/nethermind:1.36.0"},
544+
{Name: "node", Image: "nethermind/nethermind:1.36.1"},
545545
},
546546
},
547547
}
@@ -555,7 +555,7 @@ var _ = Describe("Upgrade Controller", func() {
555555
{
556556
Name: "node",
557557
RestartCount: 5,
558-
Image: "nethermind/nethermind:1.36.0",
558+
Image: "nethermind/nethermind:1.36.1",
559559
State: corev1.ContainerState{
560560
Waiting: &corev1.ContainerStateWaiting{
561561
Reason: "CrashLoopBackOff",
@@ -585,7 +585,7 @@ var _ = Describe("Upgrade Controller", func() {
585585
It("should clear Upgrading condition when all replicas are ready", func() {
586586
ctx := context.Background()
587587
name := fmt.Sprintf("test-upgrade-ok-%d", time.Now().UnixNano())
588-
nn := setupAndReconcile(ctx, name, "nethermind/nethermind", "1.36.0")
588+
nn := setupAndReconcile(ctx, name, "nethermind/nethermind", "1.36.1")
589589
DeferCleanup(func() {
590590
n := &nodesv1alpha1.BlockchainNode{}
591591
if err := k8sClient.Get(ctx, nn, n); err == nil {
@@ -603,7 +603,7 @@ var _ = Describe("Upgrade Controller", func() {
603603
if sts.Annotations == nil {
604604
sts.Annotations = map[string]string{}
605605
}
606-
sts.Annotations[annotationLastImage] = "nethermind/nethermind:1.36.0"
606+
sts.Annotations[annotationLastImage] = "nethermind/nethermind:1.36.1"
607607
sts.Annotations[annotationLastClient] = "nethermind"
608608
Expect(k8sClient.Patch(ctx, sts, stsPatch)).To(Succeed())
609609

@@ -649,7 +649,7 @@ var _ = Describe("Upgrade Controller", func() {
649649
name := fmt.Sprintf("test-setcond-%d", time.Now().UnixNano())
650650
nn := types.NamespacedName{Name: name, Namespace: testNS}
651651

652-
node := newUpgradeTestNode(name, "nethermind/nethermind", "1.36.0")
652+
node := newUpgradeTestNode(name, "nethermind/nethermind", "1.36.1")
653653
Expect(k8sClient.Create(ctx, node)).To(Succeed())
654654
DeferCleanup(func() {
655655
n := &nodesv1alpha1.BlockchainNode{}

0 commit comments

Comments
 (0)