Skip to content

Commit

Permalink
creating excluded server list in mock clint with fixed capacity
Browse files Browse the repository at this point in the history
  • Loading branch information
harsh maheshwari committed Nov 21, 2023
1 parent 8d09040 commit 85ea897
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/fdbadminclient/mock/admin_client_mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ func (client *AdminClient) GetStatus() (*fdbv1beta2.FoundationDBStatus, error) {
}

if len(client.ExcludedAddresses) > 0 {
status.Cluster.DatabaseConfiguration.ExcludedServers = make([]fdbv1beta2.ExcludedServers, 0)
status.Cluster.DatabaseConfiguration.ExcludedServers = make([]fdbv1beta2.ExcludedServers, 0, len(client.ExcludedAddresses))
}
for excludedAddresses := range client.ExcludedAddresses {
if net.ParseIP(excludedAddresses) != nil {
Expand Down

0 comments on commit 85ea897

Please sign in to comment.