Skip to content

Commit

Permalink
Improve load balancer testing
Browse files Browse the repository at this point in the history
Add testing code to validate that keystone
functions through the load balancer.
  • Loading branch information
bodepd committed Sep 18, 2014
1 parent 7698649 commit 45a7cec
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
9 changes: 9 additions & 0 deletions manifests/haproxy/openstack.pp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
$nova_ips = [],
) {

class { 'rjil::test::haproxy_openstack':
horizon_ips => $horizon_ips,
keystone_ips => $keystone_ips,
keystone_internal_ips => $keystone_internal_ips,
glance_ips => $glance_ips,
cinder_ips => $cinder_ips,
nova_ips => $nova_ips,
}

rjil::haproxy_service { 'horizon':
balancer_ports => '80',
cluster_addresses => $horizon_ips,
Expand Down
25 changes: 25 additions & 0 deletions manifests/test/haproxy_openstack.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
class rjil::test::haproxy_openstack(
$horizon_ips = [],
$keystone_ips = [],
$keystone_internal_ips = [],
$glance_ips = [],
$cinder_ips = [],
$nova_ips = [],
) {

include openstack_extras::auth_file

include rjil::test::base

if ($keystone_ips != [] or $keystone_internal_ips != []) {
include keystone::client
}

file { "/usr/lib/jiocloud/tests/haproxy_openstack.sh":
content => template('rjil/tests/haproxy_openstack.sh.erb'),
owner => 'root',
group => 'root',
mode => '755',
}

}
7 changes: 7 additions & 0 deletions templates/tests/haproxy_openstack.sh.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
set -e
test -f /root/openrc
source /root/openrc
<% if @keystone_ips != [] -%>
keystone catalog
<% end %>

0 comments on commit 45a7cec

Please sign in to comment.