Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1146938

Summary: Unittests fail when run against system and virtualenv
Product: Red Hat OpenStack Reporter: Sunil Thaha <sthaha>
Component: openstack-glanceAssignee: hguemar
Status: CLOSED CURRENTRELEASE QA Contact: nlevinki <nlevinki>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.0 (RHEL 7)CC: eglynn, fpercoco, hguemar, scohen, sgotliv, yeylon
Target Milestone: z4Keywords: ZStream
Target Release: 5.0 (RHEL 7)   
Hardware: Unspecified   
OS: All   
Whiteboard:
Fixed In Version: openstack-glance-2014.1.3-4.el7ost Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-16 13:23:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Test run log none

Description Sunil Thaha 2014-09-26 11:50:39 UTC
Created attachment 941546 [details]
Test run log

Description of problem:
-----------------------

Some unit-tests(below) fail when running './run_tests.sh -N -P' or './run_tests.sh -V -P'. 

It seems when non-supported  stores were removed from that list, it broke some tests which were not marked as skipped.
http://pkgs.devel.redhat.com/cgit/rpms/openstack-glance/tree/0006-avoid-unsupported-storage-drivers.patch?h=rhos-5.0-rhel-7

Failing tests:
- glance.tests.functional.store.test_http.TestHTTPStore.test_create_store
- glance.tests.functional.store.test_filesystem.TestFilesystemStore.test_create_store
- glance.tests.unit.test_store_base.TestStoreBase.test_create_store_exclude_unconfigurable_drivers

How reproducible: always

Steps to Reproduce:
1. install all dependencies
2. run ./run_tests.sh -N -P


Actual results: Some tests fail (listed above)


Expected results: All tests should pass or should be skipped

Comment 1 Flavio Percoco 2014-09-26 11:54:27 UTC
We need to skip/fix/remove those tests.

Comment 3 Flavio Percoco 2014-10-01 14:48:15 UTC
$ (rhos-5.0-patches branch)
$ git show git show d79f643c415c631ea455df0dce6efbce358155a8 # avoid unsupported storage drivers
[...SNIP..]
diff --git a/glance/tests/functional/store/__init__.py b/glance/tests/functional/store/__init__.py
index b6ecc50..880e230 100644
--- a/glance/tests/functional/store/__init__.py
+++ b/glance/tests/functional/store/__init__.py
@@ -69,7 +69,7 @@ class BaseTestCase(object):
     def test_create_store(self):
         self.config(known_stores=[self.store_cls_path])
         count = glance.store.create_stores()
-        self.assertEqual(8, count)
+        self.assertEqual(7, count)
 
     def test_lifecycle(self):
         """Add, get and delete an image"""

This now needs to be packaged and the package patches updated.


@haikel: Whenever you've to create a new glance package, please update this bug. Thanks :)

Comment 5 hguemar 2014-10-06 13:51:59 UTC
I haven't answered yet but ack.
It will be fixed in RDO and then, it'll be integrated in the upcoming glance rebase in RHOS.