From f9414832fc109b06b4bc611d42fec848887f1335 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Fri, 24 Sep 2021 00:23:21 +0900 Subject: [PATCH] Fix unit tests incompatible with puppetlab-stdlib 8.0.0 Since puppetlabs-stdlib 8.0.0, ensure_packages automatically translates 'ensure => present' to 'ensure => installed' and that translation breaks existing assertions in unit tests. Change-Id: Ie5e9cb8d245187fc6d363a8eb3bc1c3d899ae864 --- spec/defines/oslo_cache_spec.rb | 6 +++--- spec/defines/oslo_coordination_spec.rb | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/spec/defines/oslo_cache_spec.rb b/spec/defines/oslo_cache_spec.rb index cb067e2..40b66b5 100644 --- a/spec/defines/oslo_cache_spec.rb +++ b/spec/defines/oslo_cache_spec.rb @@ -85,7 +85,7 @@ describe 'oslo::cache' do it 'configures cache backend' do is_expected.to contain_keystone_config('cache/backend').with_value('dogpile.cache.pylibmc') is_expected.to contain_package('python-pylibmc').with( - :ensure => 'present', + :ensure => 'installed', :name => platform_params[:pylibmc_package_name], :tag => 'openstack', ) @@ -130,7 +130,7 @@ describe 'oslo::cache' do it 'configures cache backend' do is_expected.to contain_keystone_config('cache/backend').with_value('dogpile.cache.memcache') is_expected.to contain_package('python-memcache').with( - :ensure => 'present', + :ensure => 'installed', :name => platform_params[:python_memcache_package_name], :tag => ['openstack'], ) @@ -175,7 +175,7 @@ describe 'oslo::cache' do it 'configures cache backend' do is_expected.to contain_keystone_config('cache/backend').with_value('oslo_cache.etcd3gw') is_expected.to contain_package('python-etcd3gw').with( - :ensure => 'present', + :ensure => 'installed', :name => platform_params[:python_etcd3gw_package_name], :tag => ['openstack'], ) diff --git a/spec/defines/oslo_coordination_spec.rb b/spec/defines/oslo_coordination_spec.rb index 0a88286..516944e 100644 --- a/spec/defines/oslo_coordination_spec.rb +++ b/spec/defines/oslo_coordination_spec.rb @@ -22,7 +22,7 @@ describe 'oslo::coordination' do is_expected.to contain_package('python-redis').with( :name => platform_params[:python_redis_package_name], - :ensure => 'present', + :ensure => 'installed', :tag => 'openstack', ) end @@ -51,7 +51,7 @@ describe 'oslo::coordination' do if platform_params[:python_etcd3_package_name] is_expected.to contain_package('python-etcd3').with( :name => platform_params[:python_etcd3_package_name], - :ensure => 'present', + :ensure => 'installed', :tag => 'openstack', ) else @@ -128,7 +128,7 @@ describe 'oslo::coordination' do is_expected.to contain_package('python-pymemcache').with( :name => platform_params[:python_pymemcache_package_name], - :ensure => 'present', + :ensure => 'installed', :tag => 'openstack', ) end @@ -157,7 +157,7 @@ describe 'oslo::coordination' do is_expected.to contain_package('python-redis').with( :name => platform_params[:python_redis_package_name], - :ensure => 'present', + :ensure => 'installed', :tag => 'openstack', ) end