Skip to content

Commit

Permalink
Add Stopped/Resumed test case in unit test and e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
burmanm committed Jul 9, 2024
1 parent 0557116 commit 9cbb268
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pkg/reconciliation/reconcile_racks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1923,6 +1923,19 @@ func TestStartBootstrappedNodes(t *testing.T) {
wantNotReady: false,
replacements: []string{"rack1-1"},
},
{
name: "starting back from stopped state, all the nodes should be started at the same time",
racks: racks{
"rack1": {false, false},
"rack2": {false, false},
},
nodeStatus: racks{
"rack1": {true, true},
"rack2": {true, true},
},
wantNotReady: true,
wantEvents: []string{"Normal StartingCassandra Starting Cassandra for pod rack1-0", "Normal StartingCassandra Starting Cassandra for pod rack1-1", "Normal StartingCassandra Starting Cassandra for pod rack2-0", "Normal StartingCassandra Starting Cassandra for pod rack2-1"},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down
2 changes: 2 additions & 0 deletions tests/testdata/default-three-rack-three-node-dc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ apiVersion: cassandra.datastax.com/v1beta1
kind: CassandraDatacenter
metadata:
name: dc1
annotations:
cassandra.datastax.com/allow-parallel-starts: "true"
spec:
clusterName: cluster1
serverType: cassandra
Expand Down

0 comments on commit 9cbb268

Please sign in to comment.