Skip to content

Commit

Permalink
Add port override test
Browse files Browse the repository at this point in the history
  • Loading branch information
burmanm committed Sep 11, 2023
1 parent 214035d commit 52a430d
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions pkg/reconciliation/construct_podtemplatespec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1471,6 +1471,32 @@ func TestPorts(t *testing.T) {
openPorts: []int32{8080, 9000, 9042, 9103, 9142},
notOpen: []int32{8609, 9160},
},
{
dc: &api.CassandraDatacenter{
Spec: api.CassandraDatacenterSpec{
ClusterName: "bob-override",
ServerType: "cassandra",
ServerVersion: "4.1.2",
PodTemplateSpec: &corev1.PodTemplateSpec{
Spec: corev1.PodSpec{
Containers: []corev1.Container{
{
Name: "cassandra",
Ports: []corev1.ContainerPort{
{
Name: "mgmt-api-http",
ContainerPort: 8081,
},
},
},
},
},
},
},
},
openPorts: []int32{8081, 9000, 9042, 9103, 9142},
notOpen: []int32{8080, 8609, 9160},
},
{
dc: &api.CassandraDatacenter{
Spec: api.CassandraDatacenterSpec{
Expand Down

0 comments on commit 52a430d

Please sign in to comment.