Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
agouin committed Oct 8, 2024
1 parent 0da846b commit cfcd329
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions internal/fullnode/pod_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,25 @@ gaiad start --home /home/operator/cosmos`
sidecar := pod.Spec.Containers[1]
require.Equal(t, "healthcheck", sidecar.Name)
require.Nil(t, sidecar.ReadinessProbe)

crd.Spec.PodTemplate.Probes = cosmosv1.FullNodeProbesSpec{Strategy: cosmosv1.FullNodeProbeStrategyReachable}

builder = NewPodBuilder(&crd)
pod, err = builder.WithOrdinal(1).Build()
require.NoError(t, err)

require.NotNilf(t, pod.Spec.Containers[0].ReadinessProbe, "container 0")
require.Nilf(t, pod.Spec.Containers[1].ReadinessProbe, "container 1")

crd.Spec.PodTemplate.Probes = cosmosv1.FullNodeProbesSpec{Strategy: cosmosv1.FullNodeProbeStrategyInSync}

builder = NewPodBuilder(&crd)
pod, err = builder.WithOrdinal(1).Build()
require.NoError(t, err)

require.NotNilf(t, pod.Spec.Containers[0].ReadinessProbe, "container 0")
require.NotNilf(t, pod.Spec.Containers[1].ReadinessProbe, "container 1")

})

t.Run("strategic merge fields", func(t *testing.T) {
Expand Down

0 comments on commit cfcd329

Please sign in to comment.