-
Notifications
You must be signed in to change notification settings - Fork 16
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
E2E tests: dump failure information #13
Conversation
Signed-off-by: Federico Paolinelli <[email protected]>
Signed-off-by: Federico Paolinelli <[email protected]>
2fcd324
to
3a8641d
Compare
e2etests/pkg/dump/frr.go
Outdated
|
||
func BGPInfo(testName string, FRRContainers []*frrcontainer.FRR, cs clientset.Interface, f *framework.Framework) { | ||
if ReportPath == "" { | ||
log.Fatalf("ReportPath is not set") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we want to use framework.Logf
here like we do below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fatalf comes with an embedded panic. I will revert to use the framework logging and will panic in the line below
e2etests/pkg/k8s/pods.go
Outdated
|
||
const labelSelector = "app=frr-k8s" | ||
|
||
// SpeakerPods returns the set of pods running the speakers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: need to update theis comment
e2etests/pkg/k8s/pods.go
Outdated
speakerPods := make([]*corev1.Pod, 0) | ||
for _, item := range pods.Items { | ||
i := item | ||
speakerPods = append(speakerPods, &i) | ||
} | ||
return speakerPods, nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and the speakerPods
var name
e2etests/pkg/dump/k8s.go
Outdated
} | ||
|
||
func K8sInfo(testName string, reporter *k8sreporter.KubernetesReporter) { | ||
reporter.Dump(10*time.Minute, testName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please pass the 10 minutes as a const for clarity?
we named this as LogsExtractDuration
on the cnf-tests.
We dump both the content of FRR and the k8s informations. Signed-off-by: Federico Paolinelli <[email protected]>
We want to be able to triage why a test failed, so we dump whenever a failure happens. Signed-off-by: Federico Paolinelli <[email protected]>
Signed-off-by: Federico Paolinelli <[email protected]>
Signed-off-by: Federico Paolinelli <[email protected]>
Signed-off-by: Federico Paolinelli <[email protected]>
lgtm. I validated the reports locally on my end. |
Dump relevant information when a test fails.