• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ligato / bgp-agent / 66
82%

Build:
DEFAULT BRANCH: master
Ran 09 May 2018 12:16PM UTC
Jobs 1
Files 2
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
66

Pull #24

travis-ci

web-flow
Rajiv Asati's Update to applyExternalConfig()

Signed-off-by: Rajiv Asati <rajiva@cisco.com>

Ligato BGP code fails if used with an external .yaml file, because line 70 defined externalCfg of pointer type and passed it as-is in PluginConfig.GetValue() in line 71, as shown below:
//
	func (plugin *Plugin) applyExternalConfig() {
	var externalCfg *config.Bgp
	found, err := plugin.PluginConfig.GetValue(externalCfg)
//
The above meant passing a different memory address from where the external file really was (remember, every time a variable is passed as parameter, a new copy of the variable is created), resulting in a garbage being passed to ParseConfigFromYamlFile() function inside p.GetConfigName(), which then returned an error.

Fix is to define config.Bgp variable as a pointer to the address where the external .yaml file is, and pass the same pointer in PluginConfig.GetValue() in line 71 and 80. 

https://gobyexample.com/pointers
http://goinbigdata.com/golang-pass-by-pointer-vs-pass-by-value/
Pull Request #24: Rajiv Asati's Update to plugin_impl_gobgp.go

4 of 4 new or added lines in 1 file covered. (100.0%)

80 of 98 relevant lines covered (81.63%)

1.13 hits per line

Jobs
ID Job ID Ran Files Coverage
1 66.1 09 May 2018 12:16PM UTC 0
81.63
Travis Job 66.1
Source Files on build 66
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #66
  • Pull Request #24
  • PR Base - master (#63)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc