From 11babea0d15c4a2ac83282bb0cc10bcec83c180b Mon Sep 17 00:00:00 2001
From: ZhongShengping <chdzsp@163.com>
Date: Thu, 25 May 2017 11:14:54 +0800
Subject: [PATCH] Fix unit test

The db_backend_package name has changed in puppet-oslo[0], so fix it.

[0]: https://review.openstack.org/#/c/467582/

Change-Id: I7a75ca9fcd6e9a9c2a88455567083e9c4067fa6d
Closes-Bug: #1693403
---
 spec/classes/glance_api_db_spec.rb      | 3 +--
 spec/classes/glance_glare_db_spec.rb    | 3 +--
 spec/classes/glance_registry_db_spec.rb | 3 +--
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/spec/classes/glance_api_db_spec.rb b/spec/classes/glance_api_db_spec.rb
index 34140652..24b8ec28 100644
--- a/spec/classes/glance_api_db_spec.rb
+++ b/spec/classes/glance_api_db_spec.rb
@@ -66,7 +66,7 @@ describe 'glance::api::db' do
       end
 
       it 'install the proper backend package' do
-        is_expected.to contain_package('db_backend_package').with(
+        is_expected.to contain_package('python-pymysql').with(
           :ensure => 'present',
           :name   => 'python-pymysql',
           :tag    => 'openstack'
@@ -81,7 +81,6 @@ describe 'glance::api::db' do
         { :database_connection => 'mysql+pymysql://glance_api:glance@localhost/glance', }
       end
 
-      it { is_expected.not_to contain_package('db_backend_package') }
     end
   end
 
diff --git a/spec/classes/glance_glare_db_spec.rb b/spec/classes/glance_glare_db_spec.rb
index fda8e14f..064fde8f 100644
--- a/spec/classes/glance_glare_db_spec.rb
+++ b/spec/classes/glance_glare_db_spec.rb
@@ -59,7 +59,7 @@ describe 'glance::glare::db' do
       end
 
       it 'install the proper backend package' do
-        is_expected.to contain_package('db_backend_package').with(
+        is_expected.to contain_package('python-pymysql').with(
           :ensure => 'present',
           :name   => 'python-pymysql',
           :tag    => 'openstack'
@@ -74,7 +74,6 @@ describe 'glance::glare::db' do
         { :database_connection => 'mysql+pymysql://glance_glare:glance@localhost/glance', }
       end
 
-      it { is_expected.not_to contain_package('db_backend_package') }
     end
   end
 
diff --git a/spec/classes/glance_registry_db_spec.rb b/spec/classes/glance_registry_db_spec.rb
index 01a91ba7..aaee183c 100644
--- a/spec/classes/glance_registry_db_spec.rb
+++ b/spec/classes/glance_registry_db_spec.rb
@@ -66,7 +66,7 @@ describe 'glance::registry::db' do
       end
 
       it 'install the proper backend package' do
-        is_expected.to contain_package('db_backend_package').with(
+        is_expected.to contain_package('python-pymysql').with(
           :ensure => 'present',
           :name   => 'python-pymysql',
           :tag    => 'openstack'
@@ -81,7 +81,6 @@ describe 'glance::registry::db' do
         { :database_connection => 'mysql+pymysql://glance_registry:glance@localhost/glance', }
       end
 
-      it { is_expected.not_to contain_package('db_backend_package') }
     end
   end