Browse Source

Functional reproducer for bug 1891352

This reproduces the behavior described in the referenced bug, showing
the behavior before the fix. This asserts the *broken* behavior and leaves
examples of what the asserts should be for the fix patch.

Partial-Bug: #1891352

Change-Id: I992a14abb7cb41e2472741bf08b93976d4320ace
(cherry picked from commit ec372377b1)
changes/11/748011/1
Dan Smith 1 month ago
parent
commit
931d39ec38
1 changed files with 11 additions and 0 deletions
  1. +11
    -0
      glance/tests/functional/v2/test_images.py

+ 11
- 0
glance/tests/functional/v2/test_images.py View File

@@ -5604,6 +5604,17 @@ class TestImagesMultipleBackend(functional.MultipleBackendFunctionalTest):
self.assertIn('file1', jsonutils.loads(response.text)['stores'])
self.assertNotIn('file2', jsonutils.loads(response.text)['stores'])
self.assertNotIn('file3', jsonutils.loads(response.text)['stores'])
fail_key = 'os_glance_failed_import'
pend_key = 'os_glance_importing_to_stores'
# NOTE(danms): This is bug #1891352, where a failed import when
# all_stores_must_succeed=True will leave the failed store in the
# importing list forever and never put it into the failed list.
# When the bug is fixed, this is what should happen:
# self.assertEqual('file3', jsonutils.loads(response.text)[fail_key])
# self.assertEqual('', jsonutils.loads(response.text)[pend_key])
# but until it is fixed, this asserts the *broken* behavior:
self.assertEqual('', jsonutils.loads(response.text)[fail_key])
self.assertEqual('file3', jsonutils.loads(response.text)[pend_key])

# Copy newly created image to file2 and file3 stores and
# all_stores_must_succeed set to false.


Loading…
Cancel
Save