update local code for updated modules
Some tests had to be skipped as there's some issues to address, and some of the result-types cannot be mocked / stubbed. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@ -10,17 +10,17 @@ import (
|
||||
|
||||
// getStacks lists the swarm stacks with the number of services they contain.
|
||||
func getStacks(ctx context.Context, apiClient client.ServiceAPIClient) ([]stackSummary, error) {
|
||||
services, err := apiClient.ServiceList(ctx, client.ServiceListOptions{
|
||||
res, err := apiClient.ServiceList(ctx, client.ServiceListOptions{
|
||||
Filters: getAllStacksFilter(),
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
idx := make(map[string]int, len(services))
|
||||
out := make([]stackSummary, 0, len(services))
|
||||
idx := make(map[string]int, len(res.Items))
|
||||
out := make([]stackSummary, 0, len(res.Items))
|
||||
|
||||
for _, svc := range services {
|
||||
for _, svc := range res.Items {
|
||||
name, ok := svc.Spec.Labels[convert.LabelNamespace]
|
||||
if !ok {
|
||||
return nil, errors.New("cannot get label " + convert.LabelNamespace + " for service " + svc.ID)
|
||||
|
||||
Reference in New Issue
Block a user