Merge "SSL support for pre/post modular tests"
This commit is contained in:
commit
6e4ca804be
|
@ -74,7 +74,7 @@ class DatabaseInstallPostTest < Test::Unit::TestCase
|
||||||
|
|
||||||
def test_mysql_status_check_ok
|
def test_mysql_status_check_ok
|
||||||
check_port = 49000
|
check_port = 49000
|
||||||
url = "http://#{TestCommon::Settings.internal_address}:#{check_port}"
|
url = "http://#{TestCommon::Settings.fqdn}:#{check_port}"
|
||||||
assert TestCommon::Network.url_accessible?(url), 'Cannot connect to the MySQL Checker URL!'
|
assert TestCommon::Network.url_accessible?(url), 'Cannot connect to the MySQL Checker URL!'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ class GlancePostTest < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_glance_public_url_accessible
|
def test_glance_public_url_accessible
|
||||||
url = "http://#{TestCommon::Settings.public_vip}:#{PORT}"
|
url = "https://#{TestCommon::Settings.public_vip}:#{PORT}"
|
||||||
assert TestCommon::Network.url_accessible?(url), "Public Glance URL '#{url}' is not accessible!"
|
assert TestCommon::Network.url_accessible?(url), "Public Glance URL '#{url}' is not accessible!"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,8 @@ heat-api-cloudwatch
|
||||||
)
|
)
|
||||||
|
|
||||||
HOSTS = {
|
HOSTS = {
|
||||||
'public' => TestCommon::Settings.public_vip,
|
'https' => TestCommon::Settings.public_vip,
|
||||||
'management' => TestCommon::Settings.management_vip,
|
'http' => TestCommon::Settings.management_vip,
|
||||||
}
|
}
|
||||||
|
|
||||||
PORTS = {
|
PORTS = {
|
||||||
|
@ -44,7 +44,7 @@ class HeatPostTest < Test::Unit::TestCase
|
||||||
PORTS.each do |port_type, port|
|
PORTS.each do |port_type, port|
|
||||||
method_name = "test_#{host_type}_heat_#{port_type}_accessible"
|
method_name = "test_#{host_type}_heat_#{port_type}_accessible"
|
||||||
define_method method_name do
|
define_method method_name do
|
||||||
url = "http://#{ip}:#{port}"
|
url = "#{host_type}://#{ip}:#{port}"
|
||||||
assert TestCommon::Network.url_accessible?(url), "URL '#{url}' is unaccessible?"
|
assert TestCommon::Network.url_accessible?(url), "URL '#{url}' is unaccessible?"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,11 +6,11 @@ ADMIN_PORT = 35357
|
||||||
class KeystonePostTest < Test::Unit::TestCase
|
class KeystonePostTest < Test::Unit::TestCase
|
||||||
|
|
||||||
def test_keystone_is_running
|
def test_keystone_is_running
|
||||||
assert TestCommon::Process.running?('/usr/bin/keystone-all'), 'Keystone is not running!'
|
assert TestCommon::Process.running?('/usr/sbin/apache2'), 'Keystone is not running!'
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_keystone_public_url_accessible
|
def test_keystone_public_url_accessible
|
||||||
url = "http://#{TestCommon::Settings.public_vip}:#{PUBLIC_PORT}"
|
url = "https://#{TestCommon::Settings.public_vip}:#{PUBLIC_PORT}"
|
||||||
assert TestCommon::Network.url_accessible?(url), "Public Keystone URL '#{url}' is not accessible!"
|
assert TestCommon::Network.url_accessible?(url), "Public Keystone URL '#{url}' is not accessible!"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -548,7 +548,7 @@ module TestCommon
|
||||||
# @param url [String] the url to check
|
# @param url [String] the url to check
|
||||||
# @return [true,false]
|
# @return [true,false]
|
||||||
def self.url_accessible?(url)
|
def self.url_accessible?(url)
|
||||||
out = TestCommon::Cmd.run "curl --fail '#{url}' 1>/dev/null 2>/dev/null"
|
out = TestCommon::Cmd.run "curl --fail --insecure '#{url}' 1>/dev/null 2>/dev/null"
|
||||||
out.last == 0
|
out.last == 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue