Skip to content

Commit

Permalink
Ensure new type has expected behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidNix committed Jun 23, 2023
1 parent 4ed86b4 commit 00021ef
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/fullnode/configmap_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ func TestBuildConfigMaps(t *testing.T) {

require.NotEmpty(t, cms[0].Object().Data)
require.Equal(t, cms[0].Object().Data, cms[1].Object().Data)

crd.Spec.Type = cosmosv1.FullNode
cms2, err := BuildConfigMaps(&crd, nil)

require.NoError(t, err)
require.Equal(t, cms, cms2)
})

t.Run("long name", func(t *testing.T) {
Expand Down
5 changes: 5 additions & 0 deletions internal/fullnode/pod_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ func TestPodBuilder(t *testing.T) {
pod, err = builder.WithOrdinal(123).Build()
require.NoError(t, err)
require.Equal(t, "osmosis-123", pod.Name)

crd.Spec.Type = cosmosv1.FullNode
pod2, err := NewPodBuilder(&crd).WithOrdinal(123).Build()
require.NoError(t, err)
require.Equal(t, pod, pod2)
})

t.Run("happy path - ports", func(t *testing.T) {
Expand Down

0 comments on commit 00021ef

Please sign in to comment.