Skip to content

Commit

Permalink
Merge "Fixes: API server: A slash is appended to vhost name for acces…
Browse files Browse the repository at this point in the history
…sing rabbitmq" into R3.0
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Mar 11, 2016
2 parents 489dc94 + 5d31e9f commit 68c8b11
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/config/api-server/tests/test_kombu.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def setUp(self):
self.db_client_mgr = flexmock(operational=True, _sandesh=None,
config_log=lambda *args, **kwargs: None,
get_server_port=lambda: 8082)
self._url_template = "pyamqp://%s:%s@%s:%d/%s/"
self._url_template = "pyamqp://%s:%s@%s:%d/%s"
self.mock_producer = flexmock(operational = True)
self.mock_consumer = flexmock(operational = True)
flexmock(vnc_kombu.kombu.Connection, __new__ = lambda *args, **kwargs: self.mock_connect)
Expand All @@ -60,7 +60,7 @@ def test_url_parsing(self):
check_value = []
def Connection(self, urls):
if set(urls) != set(check_value):
raise WrongValueException()
raise WrongValueException("expected %s - received %s", str(check_value), str(urls))
else:
raise CorrectValueException()

Expand Down
2 changes: 1 addition & 1 deletion src/config/common/tests/tools/install_venv_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def pip_install(self, find_links, *args):
find_links_str = ' '.join('--find-links file://'+x for x in find_links)
cmd_array = ['%stools/with_venv.sh' %(os.environ.get('tools_path', '')),
'python', '.venv/bin/pip', 'install',
'--upgrade']
'--upgrade', '--no-cache-dir']
for link in find_links:
cmd_array.extend(['--find-links', 'file://'+link])
self.run_command(cmd_array + list(args),
Expand Down
2 changes: 1 addition & 1 deletion src/config/common/vnc_kombu.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def __init__(self, rabbit_hosts, rabbit_port, rabbit_user, rabbit_password,
self._urls = []
for h in _hosts:
h['vhost'] = "" if not rabbit_vhost else rabbit_vhost
_url = "pyamqp://%(user)s:%(password)s@%(host)s:%(port)s/%(vhost)s/" % h
_url = "pyamqp://%(user)s:%(password)s@%(host)s:%(port)s/%(vhost)s" % h
self._urls.append(_url)

msg = "Initializing RabbitMQ connection, urls %s" % self._urls
Expand Down

0 comments on commit 68c8b11

Please sign in to comment.