-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ParseVcapServices stops searching after the first service offeri…
…ng (#1116) The for loop on L103 was written to return after the checking the first entry in vcapMap, regardless of whether findMySQLTag found a suitable service or returned an error. If services from multiple service offerings are bound to the application and the service tagged with "mysql" is not in the first offering, the function will not find it. The new test case fails when run against the unmodified code. To fix this, flatten the map[string][]VcapService into a []VCapService, and pass the flat slice to findMySQLTag. Co-authored-by: ifindlay-cci <84311346+ifindlay-cci@users.noreply.github.com>
- Loading branch information
1 parent
e434708
commit f0a172c
Showing
2 changed files
with
81 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters