mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
Fix broken gke regional logging test.
This commit is contained in:
parent
a0844c17bf
commit
81c6bb6ec2
@ -162,8 +162,11 @@ var _ = instrumentation.SIGDescribe("Cluster level logging implemented by Stackd
|
|||||||
}()
|
}()
|
||||||
|
|
||||||
ginkgo.By("Waiting for events to ingest")
|
ginkgo.By("Waiting for events to ingest")
|
||||||
zone := framework.TestContext.CloudConfig.Zone
|
location := framework.TestContext.CloudConfig.Zone
|
||||||
c := utils.NewLogChecker(p, utils.UntilFirstEntryFromZone(zone), utils.JustTimeout, "")
|
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)
|
err := utils.WaitForLogs(c, ingestionInterval, ingestionTimeout)
|
||||||
framework.ExpectNoError(err)
|
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.
|
// 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) {
|
return func(_ string, entries []LogEntry) (bool, error) {
|
||||||
for _, e := range entries {
|
for _, e := range entries {
|
||||||
if e.Location == zone {
|
if e.Location == location {
|
||||||
return true, nil
|
return true, nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user