Allow non default db port for horizon

Change-Id: I11bfc9a8f45e5c700b9c1d2b718623f096c3e403
Closes-Bug: #1445511
This commit is contained in:
Mark Vanderwiel 2015-04-17 22:37:18 -05:00
parent 8a30325d32
commit 3bbc28747e
2 changed files with 5 additions and 2 deletions

View File

@ -437,7 +437,8 @@ describe 'openstack-dashboard::horizon' do
.with('dashboard')
.and_return('service_type' => service_type,
'db_name' => "#{service_type}_db",
'host' => "#{service_type}_host")
'host' => "#{service_type}_host",
'port' => "#{service_type}_port")
node.set['openstack']['db']['dashboard']['username'] = "#{service_type}_user"
node.set['openstack']['db']['python_packages'][service_type] = ['pkg1', 'pkg2']
end
@ -451,7 +452,8 @@ describe 'openstack-dashboard::horizon' do
[/^\s*'USER': '#{service_type}_user',$/,
/^\s*'PASSWORD': 'test-passes',$/,
/^\s*'HOST': '#{service_type}_host',$/].each do |cfg|
/^\s*'HOST': '#{service_type}_host',$/,
/^\s*'PORT': '#{service_type}_port',$/].each do |cfg|
unless service_type == 'sqlite'
it "configures the #{service_type} backend with #{cfg}" do
expect(chef_run).to render_file(file.name).with_content(cfg)

View File

@ -579,6 +579,7 @@ DATABASES = {
'USER': '<%= node["openstack"]["db"]["dashboard"]["username"] %>',
'PASSWORD': '<%= @db_pass %>',
'HOST': '<%= @db_info["host"] %>',
'PORT': '<%= @db_info["port"] %>',
<% end %>
'default-character-set': 'utf8'
},