From 53ef20ca8a4fe83f8bc3e76bbb25163b7cedb302 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Min=C3=A1=C5=99?= Date: Tue, 24 Apr 2018 12:02:46 +0000 Subject: [PATCH] typo&test fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Minář --- pkg/oc/admin/prune/imageprune/prune.go | 6 +++--- pkg/oc/admin/prune/imageprune/prune_test.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/oc/admin/prune/imageprune/prune.go b/pkg/oc/admin/prune/imageprune/prune.go index 1894a75ac8e1..40762aab29d8 100644 --- a/pkg/oc/admin/prune/imageprune/prune.go +++ b/pkg/oc/admin/prune/imageprune/prune.go @@ -963,10 +963,10 @@ func pruneStreams( return } -// strenghtenReferencesFromFailedImageStreams turns weak references between image streams and images to +// strengthenReferencesFromFailedImageStreams turns weak references between image streams and images to // strong. This must be called right after the image stream pruning to prevent images that failed to be // untagged from being pruned. -func strenghtenReferencesFromFailedImageStreams(g genericgraph.Graph, failures []Failure) { +func strengthenReferencesFromFailedImageStreams(g genericgraph.Graph, failures []Failure) { for _, f := range failures { for _, n := range g.From(f.Node) { imageNode, ok := n.(*imagegraph.ImageNode) @@ -1095,7 +1095,7 @@ func (p *pruner) Prune( return deletions, failures } - strenghtenReferencesFromFailedImageStreams(p.g, failures) + strengthenReferencesFromFailedImageStreams(p.g, failures) // Sorting images from the largest (by number of layers) to the smallest is supposed to distribute the // blob deletion workload equally across whole queue. diff --git a/pkg/oc/admin/prune/imageprune/prune_test.go b/pkg/oc/admin/prune/imageprune/prune_test.go index d81009a70dd9..ff624b81626e 100644 --- a/pkg/oc/admin/prune/imageprune/prune_test.go +++ b/pkg/oc/admin/prune/imageprune/prune_test.go @@ -1562,7 +1562,7 @@ func TestPrunerGetNextJob(t *testing.T) { // layerrefs: layer1:1, Layer1:2, LayeR1:0, layer2:1, Layer2:1, LayeR2:0, Layer3:1 checkQueue("2 to go", &is[2], &is[1]) - p.processedImages[job.Image] = job + expectBlockedOrJob(t, p, "blocked with two items#1", true, nil, nil)(p.getNextJob()) checkQueue("still 2 to go", &is[2], &is[1]) p.g.RemoveNode(imgnd0)