mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
Merge pull request #106233 from NikhilSharmaWe/betterOutputInstrumentation
Changed code to improve output for files under test/e2e/instrumentation
This commit is contained in:
commit
ec0d1edc17
@ -84,7 +84,9 @@ var _ = common.SIGDescribe("Events", func() {
|
||||
break
|
||||
}
|
||||
}
|
||||
framework.ExpectEqual(foundCreatedEvent, true, "unable to find the test event")
|
||||
if !foundCreatedEvent {
|
||||
framework.Failf("unable to find test event %s in namespace %s, full list of events is %+v", eventTestName, f.Namespace.Name, eventsList.Items)
|
||||
}
|
||||
|
||||
ginkgo.By("patching the test event")
|
||||
// patch the event's message
|
||||
@ -121,7 +123,9 @@ var _ = common.SIGDescribe("Events", func() {
|
||||
break
|
||||
}
|
||||
}
|
||||
framework.ExpectEqual(foundCreatedEvent, false, "should not have found test event after deletion")
|
||||
if foundCreatedEvent {
|
||||
framework.Failf("Should not have found test event %s in namespace %s, full list of events %+v", eventTestName, f.Namespace.Name, eventsList.Items)
|
||||
}
|
||||
})
|
||||
|
||||
/*
|
||||
|
@ -101,11 +101,15 @@ var _ = common.SIGDescribe("Events API", func() {
|
||||
|
||||
ginkgo.By("listing events in all namespaces")
|
||||
foundCreatedEvent := eventExistsInList(clientAllNamespaces, f.Namespace.Name, eventName)
|
||||
framework.ExpectEqual(foundCreatedEvent, true, "failed to find test event in list with cluster scope")
|
||||
if !foundCreatedEvent {
|
||||
framework.Failf("Failed to find test event %s in namespace %s, in list with cluster scope", eventName, f.Namespace.Name)
|
||||
}
|
||||
|
||||
ginkgo.By("listing events in test namespace")
|
||||
foundCreatedEvent = eventExistsInList(client, f.Namespace.Name, eventName)
|
||||
framework.ExpectEqual(foundCreatedEvent, true, "failed to find test event in list with namespace scope")
|
||||
if !foundCreatedEvent {
|
||||
framework.Failf("Failed to find test event %s in namespace %s, in list with namespace scope", eventName, f.Namespace.Name)
|
||||
}
|
||||
|
||||
ginkgo.By("listing events with field selection filtering on source")
|
||||
filteredCoreV1List, err := coreClient.List(context.TODO(), metav1.ListOptions{FieldSelector: "source=test-controller"})
|
||||
@ -172,11 +176,15 @@ var _ = common.SIGDescribe("Events API", func() {
|
||||
|
||||
ginkgo.By("listing events in all namespaces")
|
||||
foundCreatedEvent = eventExistsInList(clientAllNamespaces, f.Namespace.Name, eventName)
|
||||
framework.ExpectEqual(foundCreatedEvent, false, "should not have found test event after deletion")
|
||||
if foundCreatedEvent {
|
||||
framework.Failf("Should not have found test event %s in namespace %s, in list with cluster scope after deletion", eventName, f.Namespace.Name)
|
||||
}
|
||||
|
||||
ginkgo.By("listing events in test namespace")
|
||||
foundCreatedEvent = eventExistsInList(client, f.Namespace.Name, eventName)
|
||||
framework.ExpectEqual(foundCreatedEvent, false, "should not have found test event after deletion")
|
||||
if foundCreatedEvent {
|
||||
framework.Failf("Should not have found test event %s in namespace %s, in list with namespace scope after deletion", eventName, f.Namespace.Name)
|
||||
}
|
||||
})
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user