Skip to content

Commit

Permalink
Merge pull request #60968 from loburm/fix_gke_logging_test
Browse files Browse the repository at this point in the history
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
```
  • Loading branch information
Kubernetes Submit Queue committed Mar 13, 2018
2 parents 8313fc0 + 81c6bb6 commit ae990bb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions test/e2e/instrumentation/logging/stackdrvier/basic.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/instrumentation/logging/utils/wait.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit ae990bb

Please sign in to comment.