client/node: Wrap options and output

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
Paweł Gronowski
2025-10-22 12:01:37 +02:00
parent 25c509b026
commit 7ceea4148a
22 changed files with 145 additions and 76 deletions

View File

@@ -178,12 +178,12 @@ func (d *Daemon) CheckLeader(ctx context.Context) func(t *testing.T) (any, strin
errList := "could not get node list"
ls, err := cli.NodeList(ctx, client.NodeListOptions{})
result, err := cli.NodeList(ctx, client.NodeListOptions{})
if err != nil {
return err, errList
}
for _, node := range ls {
for _, node := range result.Items {
if node.ManagerStatus != nil && node.ManagerStatus.Leader {
return nil, ""
}