(_ context.Context, options client.ServiceListOptions)
| 48 | } |
| 49 | |
| 50 | func (cli *fakeClient) ServiceList(_ context.Context, options client.ServiceListOptions) (client.ServiceListResult, error) { |
| 51 | if cli.serviceListFunc != nil { |
| 52 | return cli.serviceListFunc(options) |
| 53 | } |
| 54 | |
| 55 | namespace := namespaceFromFilters(options.Filters) |
| 56 | servicesList := client.ServiceListResult{} |
| 57 | for _, name := range cli.services { |
| 58 | if belongToNamespace(name, namespace) { |
| 59 | servicesList.Items = append(servicesList.Items, serviceFromName(name)) |
| 60 | } |
| 61 | } |
| 62 | return servicesList, nil |
| 63 | } |
| 64 | |
| 65 | func (cli *fakeClient) NetworkList(_ context.Context, options client.NetworkListOptions) (client.NetworkListResult, error) { |
| 66 | if cli.networkListFunc != nil { |
no test coverage detected