(t *testing.T)
| 23 | } |
| 24 | |
| 25 | func TestPruneServices(t *testing.T) { |
| 26 | ctx := context.Background() |
| 27 | namespace := convert.NewNamespace("foo") |
| 28 | services := map[string]struct{}{ |
| 29 | "new": {}, |
| 30 | "keep": {}, |
| 31 | } |
| 32 | apiClient := &fakeClient{services: []string{objectName("foo", "keep"), objectName("foo", "remove")}} |
| 33 | dockerCli := test.NewFakeCli(apiClient) |
| 34 | |
| 35 | pruneServices(ctx, dockerCli, namespace, services) |
| 36 | assert.Check(t, is.DeepEqual(buildObjectIDs([]string{objectName("foo", "remove")}), apiClient.removedServices)) |
| 37 | } |
| 38 | |
| 39 | // TestServiceUpdateResolveImageChanged tests that the service's |
| 40 | // image digest, and "ForceUpdate" is preserved if the image did not change in |
nothing calls this directly
no test coverage detected
searching dependent graphs…