From a217c31e68562b32b64a59754484828da567fbef Mon Sep 17 00:00:00 2001 From: Andrew Gouin Date: Mon, 17 Jun 2024 16:59:46 -0600 Subject: [PATCH] improve test --- internal/fullnode/pod_builder_test.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/internal/fullnode/pod_builder_test.go b/internal/fullnode/pod_builder_test.go index f29dddad..e042b203 100644 --- a/internal/fullnode/pod_builder_test.go +++ b/internal/fullnode/pod_builder_test.go @@ -624,6 +624,10 @@ gaiad start --home /home/operator/cosmos` "new-sidecar": "new-sidecar:v3.0.0", }, }, + { + UpgradeHeight: 400, + Image: "image:v4.0.0", + }, } crd.Status.Height = map[string]uint64{ @@ -679,6 +683,23 @@ gaiad start --home /home/operator/cosmos` require.Equal(t, "new-init", pod2.Spec.InitContainers[2].Name) require.Equal(t, "new-init:v3.0.0", pod2.Spec.InitContainers[2].Image) + crd.Status.Height["osmosis-2"] = 400 + pod2, err = builder.WithOrdinal(2).Build() + + require.Equal(t, "osmosis-2", pod2.Name) + + require.Equal(t, "node", pod2.Spec.Containers[0].Name) + require.Equal(t, "image:v4.0.0", pod2.Spec.Containers[0].Image) + + require.Equal(t, "new-sidecar", pod2.Spec.Containers[1].Name) + require.Equal(t, "new-sidecar:latest", pod2.Spec.Containers[1].Image) + + require.Equal(t, "chain-init", pod2.Spec.InitContainers[1].Name) + require.Equal(t, "image:v4.0.0", pod2.Spec.InitContainers[1].Image) + + require.Equal(t, "new-init", pod2.Spec.InitContainers[2].Name) + require.Equal(t, "new-init:latest", pod2.Spec.InitContainers[2].Image) + }) }