From 0a5e2d64ab57480166d69f8f0157517ccefa6b6f Mon Sep 17 00:00:00 2001 From: Mark Vanderwiel Date: Mon, 9 May 2016 16:40:56 -0500 Subject: [PATCH] Add Heat tests Enable Heat tests. Create heat stack owner role. Change-Id: Ic3f142772aae40eaa1fd1b78ae0d6921e9cf6e57 --- attributes/default.rb | 1 + recipes/setup.rb | 9 +++++++++ spec/setup_spec.rb | 10 ++++++++++ templates/default/tempest.conf.erb | 2 +- 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/attributes/default.rb b/attributes/default.rb index b5fb6ae..1e0dae6 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -26,6 +26,7 @@ default['openstack']['integration-test'] = { 'alt_ssh_user' => 'cirros', 'ssh_user' => 'cirros', 'fixed_network' => 'local_net', + 'heat_stack_user_role' => 'heat_stack_owner', 'user1' => { 'user_name' => 'tempest_user1', 'password' => 'tempest_user1_pass', diff --git a/recipes/setup.rb b/recipes/setup.rb index 43df105..fe640c4 100644 --- a/recipes/setup.rb +++ b/recipes/setup.rb @@ -89,6 +89,15 @@ admin_pass = get_password 'user', node['openstack']['identity']['ad end end +# Create role for heat template defined users +heat_stack_user_role = node['openstack']['integration-test']['heat_stack_user_role'] +openstack_identity_register "Create '#{heat_stack_user_role}' Role for template defined users" do + auth_uri auth_uri + bootstrap_token bootstrap_token + role_name heat_stack_user_role + action :create_role +end + git '/opt/tempest' do repository 'https://github.com/openstack/tempest' reference 'master' diff --git a/spec/setup_spec.rb b/spec/setup_spec.rb index 799ccda..7daeae0 100644 --- a/spec/setup_spec.rb +++ b/spec/setup_spec.rb @@ -116,6 +116,16 @@ describe 'openstack-integration-test::setup' do ) end + it 'creats heat stack owner role' do + expect(chef_run).to create_role_openstack_identity_register( + "Create 'heat_stack_owner' Role for template defined users" + ).with( + auth_uri: 'http://127.0.0.1:35357/v2.0', + bootstrap_token: 'bootstrap-token', + role_name: 'heat_stack_owner' + ) + end + it 'syncs /opt/tempest from github' do expect(chef_run).to sync_git( '/opt/tempest' diff --git a/templates/default/tempest.conf.erb b/templates/default/tempest.conf.erb index 2d34702..f978d5f 100644 --- a/templates/default/tempest.conf.erb +++ b/templates/default/tempest.conf.erb @@ -167,7 +167,7 @@ savanna = False ironic = False ceilometer = False horizon = True -heat = False +heat = True swift = False neutron = False glance = True