Skip to content

Commit

Permalink
typo&test fix
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Minář <[email protected]>
  • Loading branch information
Michal Minář committed Apr 24, 2018
1 parent f0f0475 commit 53ef20c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pkg/oc/admin/prune/imageprune/prune.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion pkg/oc/admin/prune/imageprune/prune_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 53ef20c

Please sign in to comment.