test case in test_volume_unicode.py breaks legacy-tempest-dsvm-full-devstack-plugin-ceph job

Bug #1736676 reported by Jeremy Zhang
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Jeremy Zhang

Bug Description

The test case in cinder/tests/tempest/api/volume/test_volume_unicode.py breaks legacy-tempest-dsvm-full-devstack-plugin-ceph CI job.

2017-12-06 04:35:27.373114 | primary | Captured traceback:
2017-12-06 04:35:27.373150 | primary | ~~~~~~~~~~~~~~~~~~~
2017-12-06 04:35:27.373188 | primary | Traceback (most recent call last):
2017-12-06 04:35:27.373253 | primary | File "/opt/stack/new/cinder/cinder/tests/tempest/api/volume/test_volume_unicode.py", line 70, in test_snapshot_create_volume_description_non_ascii_code
2017-12-06 04:35:27.373298 | primary | self.assertEqual(description, snapshot_info['description'])
2017-12-06 04:35:27.373345 | primary | File "/usr/local/lib/python2.7/dist-packages/testtools/testcase.py", line 411, in assertEqual
2017-12-06 04:35:27.373378 | primary | self.assertThat(observed, matcher, message)
2017-12-06 04:35:27.373422 | primary | File "/usr/local/lib/python2.7/dist-packages/testtools/testcase.py", line 498, in assertThat
2017-12-06 04:35:27.373447 | primary | raise mismatch_error
2017-12-06 04:35:27.373487 | primary | testtools.matchers._impl.MismatchError: u'\u05e7\u05d9\u05d9\u05e4\u05e9' != None

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/525981

Changed in cinder:
assignee: nobody → Jeremy Zhang (jeremy.zhang)
status: New → In Progress
Revision history for this message
Jean-Philippe Evrard (jean-philippe-evrard) wrote :

Breaks openstack-ansible os_cinder gates too.

Revision history for this message
John Griffith (john-griffith) wrote :

One additional thing on this, the test is making an assumption that the description should be copied from the volume and added to to the snapshot. This is an incorrect assumption, that's not at all how the snapshot-description should be used or set.

It sounds like there might be some backends doing that somewhere, and that will probably be another/related bug, but this particular issue IMO is a poorly written test that is incorrect.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/525981
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=141b5c6229505836f53a0ee49e532d3326e73e60
Submitter: Zuul
Branch: master

commit 141b5c6229505836f53a0ee49e532d3326e73e60
Author: jeremy.zhang <zhangjun_inspur@163.com>
Date: Wed Dec 6 16:18:15 2017 +0800

    Fix test case in test_volume_unicode.py

    The test case `test_snapshot_create_volume_description_non_ascii_code`
    in test_volume_unicode.py breaks the CI job [1], as the test case makes
    a wrong assumption that the 'descrption' of snapshot will be inherited
    from source volume. This patch aims to fix it.

    [1] legacy-tempest-dsvm-full-devstack-plugin-ceph

    Change-Id: I038684acc488fb1ddba0daff348a23ebf45083da
    Closes-Bug: #1736676

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder-tempest-plugin (master)

Fix proposed to branch: master
Review: https://review.openstack.org/528514

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 12.0.0.0b3

This issue was fixed in the openstack/cinder 12.0.0.0b3 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder-tempest-plugin (master)

Change abandoned by Sean McGinnis (<email address hidden>) on branch: master
Review: https://review.openstack.org/528514
Reason: Squashed into parent change.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder-tempest-plugin (master)

Reviewed: https://review.openstack.org/528513
Committed: https://git.openstack.org/cgit/openstack/cinder-tempest-plugin/commit/?id=c82162a385040fcf70444a10bae98ca3f2823bc2
Submitter: Zuul
Branch: master

commit c82162a385040fcf70444a10bae98ca3f2823bc2
Author: lkuchlan <email address hidden>
Date: Sun Dec 3 09:09:47 2017 +0200

    Add test for volume create with non-ascii characters

    This test was uploaded since there was a bug [1] while creating
    a volume snapshot if the description of the parent volume contains
    non-ascii code.

    [1] https://bugzilla.redhat.com/show_bug.cgi?id=1383899

    Related-bug: #1393871
    Closes-Bug: #1736676
    Change-Id: I9fc41a426b29fad4f4d42a584325f0465a20effe

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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