mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
Merge pull request #105939 from NikhilSharmaWe/betterOutputFramework
Changed code to improve output for files under test/e2e/framework
This commit is contained in:
commit
16c86404dc
@ -75,7 +75,9 @@ func (p *Provider) FrameworkBeforeEach(f *framework.Framework) {
|
||||
p.controller, err = kubemark.NewKubemarkController(externalClient, externalInformerFactory, f.ClientSet, kubemarkNodeInformer)
|
||||
framework.ExpectNoError(err)
|
||||
externalInformerFactory.Start(p.closeChannel)
|
||||
framework.ExpectEqual(p.controller.WaitForCacheSync(p.closeChannel), true)
|
||||
if !p.controller.WaitForCacheSync(p.closeChannel) {
|
||||
framework.Failf("Unable to sync caches for %v", p.controller)
|
||||
}
|
||||
go p.controller.Run(p.closeChannel)
|
||||
}
|
||||
}
|
||||
|
@ -1377,7 +1377,7 @@ retriesLoop:
|
||||
// NOTE the test may need access to the events to see what's going on, such as a change in status
|
||||
actualWatchEvents := scenario(resourceWatch)
|
||||
errs := sets.NewString()
|
||||
ExpectEqual(len(expectedWatchEvents) <= len(actualWatchEvents), true, "Error: actual watch events amount (%d) must be greater than or equal to expected watch events amount (%d)", len(actualWatchEvents), len(expectedWatchEvents))
|
||||
gomega.Expect(len(expectedWatchEvents)).To(gomega.BeNumerically("<=", len(actualWatchEvents)), "Did not get enough watch events")
|
||||
|
||||
totalValidWatchEvents := 0
|
||||
foundEventIndexes := map[int]*int{}
|
||||
@ -1406,7 +1406,9 @@ retriesLoop:
|
||||
fmt.Println("invariants violated:\n", strings.Join(errs.List(), "\n - "))
|
||||
continue retriesLoop
|
||||
}
|
||||
ExpectEqual(errs.Len() > 0, false, strings.Join(errs.List(), "\n - "))
|
||||
if errs.Len() > 0 {
|
||||
Failf("Unexpected error(s): %v", strings.Join(errs.List(), "\n - "))
|
||||
}
|
||||
ExpectEqual(totalValidWatchEvents, len(expectedWatchEvents), "Error: there must be an equal amount of total valid watch events (%d) and expected watch events (%d)", totalValidWatchEvents, len(expectedWatchEvents))
|
||||
break retriesLoop
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user