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

ligato / bgp-agent / 66 / 1
82%
master: 82%

Build:
DEFAULT BRANCH: master
Ran 09 May 2018 12:16PM UTC
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

09 May 2018 12:09PM UTC coverage: 81.633%. Remained the same
66.1

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

80 of 98 relevant lines covered (81.63%)

1.13 hits per line

Source Files on job 66.1
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 65
  • Travis Job 66.1
  • 04ce6117 on github
  • Prev Job for on master (#63.1)
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