summaryrefslogtreecommitdiffhomepage
path: root/test/lib/gobgp.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/lib/gobgp.py')
-rw-r--r--test/lib/gobgp.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/lib/gobgp.py b/test/lib/gobgp.py
index 14fbfe1f..0251a807 100644
--- a/test/lib/gobgp.py
+++ b/test/lib/gobgp.py
@@ -47,7 +47,8 @@ def extract_path_attribute(path, typ):
class GoBGPContainer(BGPContainer):
-
+ LOCAL_GOPATH = os.environ['GOPATH']
+ CONTAINER_GOPATH = '/go'
SHARED_VOLUME = '/root/shared_volume'
QUAGGA_VOLUME = '/etc/quagga'
@@ -56,6 +57,11 @@ class GoBGPContainer(BGPContainer):
zapi_version=2, ospfd_config=None):
super(GoBGPContainer, self).__init__(name, asn, router_id,
ctn_image_name)
+ # Add volume to export local GoBGP executables into container.
+ self.shared_volumes.append(
+ (self.LOCAL_GOPATH + '/bin/', self.CONTAINER_GOPATH + '/bin/'))
+
+ # Add volume to export config files into container.
self.shared_volumes.append((self.config_dir, self.SHARED_VOLUME))
self.log_level = log_level