mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
client/node: Wrap options and output
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
@@ -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, ""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user