mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Merge pull request #60968 from loburm/fix_gke_logging_test
Automatic merge from submit-queue (batch tested with PRs 60737, 60739, 61080, 60968, 60951). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Fix broken gke regional logging test. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes #60882 ```release-note NONE ```
This commit is contained in:
commit
ae990bb5a9
@ -162,8 +162,11 @@ var _ = instrumentation.SIGDescribe("Cluster level logging implemented by Stackd
|
||||
}()
|
||||
|
||||
ginkgo.By("Waiting for events to ingest")
|
||||
zone := framework.TestContext.CloudConfig.Zone
|
||||
c := utils.NewLogChecker(p, utils.UntilFirstEntryFromZone(zone), utils.JustTimeout, "")
|
||||
location := framework.TestContext.CloudConfig.Zone
|
||||
if framework.TestContext.CloudConfig.MultiZone {
|
||||
location = framework.TestContext.CloudConfig.Region
|
||||
}
|
||||
c := utils.NewLogChecker(p, utils.UntilFirstEntryFromLocation(location), utils.JustTimeout, "")
|
||||
err := utils.WaitForLogs(c, ingestionInterval, ingestionTimeout)
|
||||
framework.ExpectNoError(err)
|
||||
})
|
||||
|
@ -55,12 +55,12 @@ func UntilFirstEntryFromLog(log string) IngestionPred {
|
||||
}
|
||||
}
|
||||
|
||||
// UntilFirstEntryFromZone is a IngestionPred that checks that at least one
|
||||
// UntilFirstEntryFromLocation is a IngestionPred that checks that at least one
|
||||
// entry from the log with a given name was ingested.
|
||||
func UntilFirstEntryFromZone(zone string) IngestionPred {
|
||||
func UntilFirstEntryFromLocation(location string) IngestionPred {
|
||||
return func(_ string, entries []LogEntry) (bool, error) {
|
||||
for _, e := range entries {
|
||||
if e.Location == zone {
|
||||
if e.Location == location {
|
||||
return true, nil
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user