Fix CI
1) The host and port options[1] should be bind_host and bind_port. The host option[2] is the hostname that Octavia is running on. See log[3]. So fix it. [1]https://github.com/openstack/octavia/blob/master/octavia/common/config.py#L33 [2]https://github.com/openstack/octavia/blob/master/octavia/common/config.py#L53 [3]http://logs.openstack.org/55/467855/1/check/gate-puppet-octavia-puppet-beaker-rspec-centos-7/9c5655b/logs/octavia/worker.txt.gz#_2017-06-09_00_54_01_238 2) Fix unit test The db_backend_package name has changed in puppet-oslo[0], so fix it. [0]: https://review.openstack.org/#/c/467582/ Change-Id: I1b27e61247130df57d9c34e80cfdc96d35e2bdc4 Closes-Bug: #1693403 Closes-Bug: #1696890
This commit is contained in:
parent
79ea524cd0
commit
8062f88888
|
@ -12,11 +12,11 @@
|
|||
#
|
||||
# [*host*]
|
||||
# (optional) The octavia api bind address.
|
||||
# Defaults to 0.0.0.0
|
||||
# Defaults to '0.0.0.0'
|
||||
#
|
||||
# [*port*]
|
||||
# (optional) The octavia api port.
|
||||
# Defaults to 9876
|
||||
# Defaults to '9876'
|
||||
#
|
||||
# [*package_ensure*]
|
||||
# (optional) ensure state for package.
|
||||
|
@ -29,15 +29,15 @@
|
|||
# [*sync_db*]
|
||||
# (optional) Run octavia-db-manage upgrade head on api nodes after installing the package.
|
||||
# Defaults to false
|
||||
|
||||
#
|
||||
class octavia::api (
|
||||
$manage_service = true,
|
||||
$enabled = true,
|
||||
$package_ensure = 'present',
|
||||
$host = '0.0.0.0',
|
||||
$port = '9876',
|
||||
$auth_strategy = 'keystone',
|
||||
$sync_db = false,
|
||||
$manage_service = true,
|
||||
$enabled = true,
|
||||
$package_ensure = 'present',
|
||||
$host = '0.0.0.0',
|
||||
$port = '9876',
|
||||
$auth_strategy = 'keystone',
|
||||
$sync_db = false,
|
||||
) inherits octavia::params {
|
||||
|
||||
include ::octavia::deps
|
||||
|
@ -76,9 +76,9 @@ class octavia::api (
|
|||
}
|
||||
|
||||
octavia_config {
|
||||
'DEFAULT/host' : value => $host;
|
||||
'DEFAULT/port' : value => $port;
|
||||
'DEFAULT/auth_strategy' : value => $auth_strategy;
|
||||
'DEFAULT/bind_host' : value => $host;
|
||||
'DEFAULT/bind_port' : value => $port;
|
||||
'DEFAULT/auth_strategy' : value => $auth_strategy;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -12,11 +12,11 @@ describe 'octavia::api' do
|
|||
end
|
||||
|
||||
let :params do
|
||||
{ :enabled => true,
|
||||
:manage_service => true,
|
||||
:package_ensure => 'latest',
|
||||
:port => '9876',
|
||||
:host => '0.0.0.0',
|
||||
{ :enabled => true,
|
||||
:manage_service => true,
|
||||
:package_ensure => 'latest',
|
||||
:port => '9876',
|
||||
:host => '0.0.0.0',
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -40,8 +40,8 @@ describe 'octavia::api' do
|
|||
params.clear()
|
||||
end
|
||||
it 'configures with default values' do
|
||||
is_expected.to contain_octavia_config('DEFAULT/host').with_value( '0.0.0.0' )
|
||||
is_expected.to contain_octavia_config('DEFAULT/port').with_value( '9876' )
|
||||
is_expected.to contain_octavia_config('DEFAULT/bind_host').with_value( '0.0.0.0' )
|
||||
is_expected.to contain_octavia_config('DEFAULT/bind_port').with_value( '9876' )
|
||||
is_expected.to contain_octavia_config('DEFAULT/auth_strategy').with_value( 'keystone' )
|
||||
end
|
||||
it 'does not sync the database' do
|
||||
|
@ -50,8 +50,8 @@ describe 'octavia::api' do
|
|||
end
|
||||
|
||||
it 'configures bind_host and bind_port' do
|
||||
is_expected.to contain_octavia_config('DEFAULT/host').with_value( params[:host] )
|
||||
is_expected.to contain_octavia_config('DEFAULT/port').with_value( params[:port] )
|
||||
is_expected.to contain_octavia_config('DEFAULT/bind_host').with_value( params[:host] )
|
||||
is_expected.to contain_octavia_config('DEFAULT/bind_port').with_value( params[:port] )
|
||||
end
|
||||
|
||||
[{:enabled => true}, {:enabled => false}].each do |param_hash|
|
||||
|
|
|
@ -95,7 +95,7 @@ describe 'octavia::db' do
|
|||
end
|
||||
|
||||
it 'install the proper backend package' do
|
||||
is_expected.to contain_package('db_backend_package').with(
|
||||
is_expected.to contain_package('python-pymysql').with(
|
||||
:ensure => 'present',
|
||||
:name => 'python-pymysql',
|
||||
:tag => 'openstack'
|
||||
|
@ -119,9 +119,6 @@ describe 'octavia::db' do
|
|||
{ :database_connection => 'mysql+pymysql://octavia:octavia@localhost/octavia', }
|
||||
end
|
||||
|
||||
it 'install the proper backend package' do
|
||||
is_expected.not_to contain_package('db_backend_package')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue