Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add container details to error message #1517

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion cnf-certification-test/networking/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ func testExecProbDenyAtCPUPinning(dpdkPods []*provider.Pod) {
for _, cpuPinnedPod := range dpdkPods {
for _, cut := range cpuPinnedPod.Containers {
if cut.HasExecProbes() {
ginkgo.Fail("Exec prob is not allowed")
ginkgo.Fail(fmt.Sprintf(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good moment to fix this test case: we shouldn't call ginkgo.Fail() here, as it aborts the execution of the test case at this point, so the rest containers won't be checked.

The container's name+pod+namespace should be saved to create a nonCompliantObjects (or compliantObject) list. See the test case code in testRestartOnRebootLabelOnPodsUsingSriov() for reference.

"Exec prob is not allowed, namespace: %s, pod: %s, container: %s",
cut.Namespace, cut.Podname, cut.Name))
}
}
}
Expand Down