[stable/victoria] ddt version incompatibility for victoria branch

Bug #1946167 reported by Sam Morrison
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
New
Low
Unassigned

Bug Description

In victoria test-requirements state:

ddt>=1.2.1

However the tests use the code:

cinder/tests/unit/volume/flows/test_create_volume_flow.py:@ddt.ddt(testNameFormat=ddt.TestNameFormat.INDEX_ONLY)

Which is not in ddt 1.2.1

=========================
Failures during discovery
=========================
--- import errors ---
Failed to import test module: cinder.tests.unit.volume.flows.test_create_volume_flow
Traceback (most recent call last):
  File "/usr/lib/python3.8/unittest/loader.py", line 436, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/lib/python3.8/unittest/loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "/build/cinder-17.2.0.3.gd29705378+focal/cinder/tests/unit/volume/flows/test_create_volume_flow.py", line 1258, in <module>
    @ddt.ddt(testNameFormat=ddt.TestNameFormat.INDEX_ONLY)
AttributeError: module 'ddt' has no attribute 'TestNameFormat'

This is the version that is in ubuntu focal victoria

This breakage was added in commit 8095a7af801e7b4511bde7e02412bcd6687eb1d1

Not sure the best way to handle this, update the test-reqirements for stable/victoria ?

Tags: tests victoria
Changed in cinder:
importance: Undecided → Low
tags: added: test victoria
Revision history for this message
Sofia Enriquez (lsofia-enriquez) wrote :

This is interesting because the current CI for stable/victoria passed because I think it's using the master file test-requirements.txt ( ddt==1.4.1 ) instead of the stable/victoria one [1]. Maybe we can update the version in stable/victoria code. [2]

[1] https://zuul.opendev.org/t/openstack/build/a630bf25689141d8b329bc6119e9b218/log/job-output.txt#731

[2] https://opendev.org/openstack/cinder/src/branch/stable/victoria/test-requirements.txt#L12

summary: - ddt version imcompatiblity for victoria branch
+ [stable/victoria] ddt version incompatibility for victoria branch
tags: added: tests
removed: test
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.