Skip to content

Commit

Permalink
improve test
Browse files Browse the repository at this point in the history
  • Loading branch information
agouin committed Jun 17, 2024
1 parent c06bd96 commit a217c31
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions internal/fullnode/pod_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -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)

})
}

Expand Down

0 comments on commit a217c31

Please sign in to comment.