![Dmitry Ilyin](/assets/img/avatar_default.png)
* Use common library for tests Related blueprint: fuel-library-modularization Fuel-CI: disable Change-Id: I8769748ae79d5a1597eb0f320e0a0ed9581d5a0b
41 lines
984 B
Ruby
41 lines
984 B
Ruby
require File.join File.dirname(__FILE__), '../test_common.rb'
|
|
|
|
def expected_backends
|
|
return $expected_backends if $expected_backends
|
|
backends = %w(
|
|
Stats
|
|
horizon
|
|
keystone-1
|
|
keystone-2
|
|
nova-api-1
|
|
nova-api-2
|
|
nova-metadata-api
|
|
cinder-api
|
|
glance-api
|
|
neutron
|
|
glance-registry
|
|
mysqld
|
|
swift
|
|
heat-api
|
|
heat-api-cfn
|
|
heat-api-cloudwatch
|
|
nova-novncproxy
|
|
)
|
|
backends += %w(sahara) if TestCommon::Settings.sahara['enabled']
|
|
backends += %w(murano murano_rabbitmq) if TestCommon::Settings.murano['enabled']
|
|
$expected_backends = backends
|
|
end
|
|
|
|
class OpenstackHaproxyPostTest < Test::Unit::TestCase
|
|
def self.create_tests
|
|
expected_backends.each do |backend|
|
|
method_name = "test_backend_#{backend}_present"
|
|
define_method method_name do
|
|
assert TestCommon::HAProxy.backend_present?(backend), "There is no '#{backend}' HAProxy backend!"
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
OpenstackHaproxyPostTest.create_tests
|