mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
client: add Filters type
Add a new type to use for building filter predicates for API requests, replacing "./api/types/filters".Args in the client. Remove the now unused api/types/filters package. Signed-off-by: Cory Snider <csnider@mirantis.com>
This commit is contained in:
@@ -8,7 +8,6 @@ import (
|
||||
"testing"
|
||||
|
||||
cerrdefs "github.com/containerd/errdefs"
|
||||
"github.com/moby/moby/api/types/filters"
|
||||
"github.com/moby/moby/api/types/swarm"
|
||||
"github.com/moby/moby/client"
|
||||
"gotest.tools/v3/assert"
|
||||
@@ -105,7 +104,7 @@ func (d *Daemon) CheckRunningTaskNetworks(ctx context.Context) func(t *testing.T
|
||||
defer cli.Close()
|
||||
|
||||
tasks, err := cli.TaskList(ctx, client.TaskListOptions{
|
||||
Filters: filters.NewArgs(filters.Arg("desired-state", "running")),
|
||||
Filters: make(client.Filters).Add("desired-state", "running"),
|
||||
})
|
||||
assert.NilError(t, err)
|
||||
|
||||
@@ -126,7 +125,7 @@ func (d *Daemon) CheckRunningTaskImages(ctx context.Context) func(t *testing.T)
|
||||
defer cli.Close()
|
||||
|
||||
tasks, err := cli.TaskList(ctx, client.TaskListOptions{
|
||||
Filters: filters.NewArgs(filters.Arg("desired-state", "running")),
|
||||
Filters: make(client.Filters).Add("desired-state", "running"),
|
||||
})
|
||||
assert.NilError(t, err)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user