Skip to content

Commit

Permalink
Update tests for createcluster command
Browse files Browse the repository at this point in the history
  • Loading branch information
aadomn committed Aug 28, 2024
1 parent 0e3dfbc commit 9c581af
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions cmd/createcluster_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,26 @@ func TestCreateCluster(t *testing.T) {
},
},
},
{
Name: "threshold greater than the number of nodes",
Config: clusterConfig{
NumNodes: 4,
Threshold: 5,
NumDVs: 1,
Network: defaultNetwork,
},
expectedErr: "threshold cannot be greater than number of operators",
},
{
Name: "threshold smaller than 2",
Config: clusterConfig{
NumNodes: 4,
Threshold: 1,
NumDVs: 1,
Network: defaultNetwork,
},
expectedErr: "threshold cannot be smaller than 2",
},
}
for _, test := range tests {
t.Run(test.Name, func(t *testing.T) {
Expand Down

0 comments on commit 9c581af

Please sign in to comment.