Skip to content

Commit

Permalink
tighten scc test to start failing on more than six pods failing
Browse files Browse the repository at this point in the history
  • Loading branch information
deads2k committed Oct 13, 2020
1 parent 2c51df8 commit 82023c3
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion test/extended/authorization/scc.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,17 @@ var _ = g.Describe("[sig-auth][Feature:SCC][Early]", func() {
denialString := fmt.Sprintf("%v for %v.%v/%v -n %v happened %d times", event.Message, event.InvolvedObject.Kind, event.InvolvedObject.APIVersion, event.InvolvedObject.Name, event.InvolvedObject.Namespace, event.Count)
denialStrings = append(denialStrings, denialString)
}
result.Flakef(strings.Join(denialStrings, "\n"))

numFailingPods := len(denialStrings)
failMessage := fmt.Sprintf("%d pods failed on SCC errors\n%s\n", numFailingPods, strings.Join(denialStrings, "\n"))
if numFailingPods > 6 {
// deads2k chose six as a number that passes nearly all the time on 4.6. If this gets worse, we should double check against 4.6.
// if I was wrong about 4.6, then adjust this up. If I am right about 4.6, then fix whatever regressed this.
// Because the CVO starts a static pod that races with the cluster-policy-controller, it is impractical to get this value to 0.
g.Fail(failMessage)
return
}

result.Flakef(failMessage)
})
})

0 comments on commit 82023c3

Please sign in to comment.