From 49bc4a28012142dc3b97104f60d367efd9251c23 Mon Sep 17 00:00:00 2001 From: Alexander Arzhanov Date: Fri, 10 Jun 2016 14:08:56 +0300 Subject: [PATCH] Fix noop tests for new fixtures This patch makes it possible to enable new fixtures for mitaka I68c01122ac62c04321972feef443df8da546ea83 - Added the compute-vmware role in globals tasks for noop script - Fix noop tests Change-Id: If5cd2e0c15c0a7c5125886b6ea2a6cd0fb29456c Partial-Bug: 1541849 Related-Bug: 1535339 --- tests/noop/spec/hosts/common.rb | 2 +- tests/noop/spec/hosts/globals/globals_spec.rb | 1 + tests/noop/spec/hosts/roles/cinder_spec.rb | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/noop/spec/hosts/common.rb b/tests/noop/spec/hosts/common.rb index 723fb9e50c..9051f11358 100644 --- a/tests/noop/spec/hosts/common.rb +++ b/tests/noop/spec/hosts/common.rb @@ -12,5 +12,5 @@ shared_examples 'compute_service_common' do end shared_examples 'common' do - include_examples 'compute_service_common' unless Noop.current_spec_is? 'roles/enable_compute' + include_examples 'compute_service_common' unless Noop.current_spec_is? 'roles/enable_compute' or Noop.current_spec_is? 'vmware/compute-vmware' end diff --git a/tests/noop/spec/hosts/globals/globals_spec.rb b/tests/noop/spec/hosts/globals/globals_spec.rb index af49af8dfc..84ab5a02bc 100644 --- a/tests/noop/spec/hosts/globals/globals_spec.rb +++ b/tests/noop/spec/hosts/globals/globals_spec.rb @@ -5,6 +5,7 @@ # ROLE: ironic # ROLE: controller # ROLE: compute +# ROLE: compute-vmware # ROLE: cinder-vmware # ROLE: cinder-block-device # ROLE: cinder diff --git a/tests/noop/spec/hosts/roles/cinder_spec.rb b/tests/noop/spec/hosts/roles/cinder_spec.rb index f6ce23e60e..1cf5ad3e81 100644 --- a/tests/noop/spec/hosts/roles/cinder_spec.rb +++ b/tests/noop/spec/hosts/roles/cinder_spec.rb @@ -28,6 +28,7 @@ describe manifest do cinder_db_user = Noop.hiera_structure 'cinder/db_user', 'cinder' cinder_db_name = Noop.hiera_structure 'cinder/db_name', 'cinder' cinder = Noop.puppet_function 'roles_include', 'cinder' + cinder_vmware = Noop.puppet_function 'roles_include', 'cinder-vmware' hostname = Noop.hiera('fqdn') let(:manage_volumes) do @@ -37,6 +38,8 @@ describe manifest do 'ceph' elsif storage_hash['volumes_block_device'] 'block' + elsif cinder_vmware + 'vmdk' else false end