Browse Source

Merge "Add missing tests for 2.6 statuses"

tags/18.0.0.0b1
Zuul 8 months ago
parent
commit
95bb08c806
1 changed files with 18 additions and 0 deletions
  1. 18
    0
      glance/tests/unit/v2/test_images_resource.py

+ 18
- 0
glance/tests/unit/v2/test_images_resource.py View File

@@ -1821,6 +1821,12 @@ class TestImagesController(base.IsolatedUnitTest):
1821 1821
     def test_location_add_not_permitted_status_killed(self):
1822 1822
         self._test_update_locations_status('killed', 'add')
1823 1823
 
1824
+    def test_location_add_not_permitted_status_importing(self):
1825
+        self._test_update_locations_status('importing', 'add')
1826
+
1827
+    def test_location_add_not_permitted_status_uploading(self):
1828
+        self._test_update_locations_status('uploading', 'add')
1829
+
1824 1830
     def test_location_remove_not_permitted_status_saving(self):
1825 1831
         self._test_update_locations_status('saving', 'remove')
1826 1832
 
@@ -1839,6 +1845,12 @@ class TestImagesController(base.IsolatedUnitTest):
1839 1845
     def test_location_remove_not_permitted_status_queued(self):
1840 1846
         self._test_update_locations_status('queued', 'remove')
1841 1847
 
1848
+    def test_location_remove_not_permitted_status_importing(self):
1849
+        self._test_update_locations_status('importing', 'remove')
1850
+
1851
+    def test_location_remove_not_permitted_status_uploading(self):
1852
+        self._test_update_locations_status('uploading', 'remove')
1853
+
1842 1854
     def test_location_replace_not_permitted_status_saving(self):
1843 1855
         self._test_update_locations_status('saving', 'replace')
1844 1856
 
@@ -1854,6 +1866,12 @@ class TestImagesController(base.IsolatedUnitTest):
1854 1866
     def test_location_replace_not_permitted_status_killed(self):
1855 1867
         self._test_update_locations_status('killed', 'replace')
1856 1868
 
1869
+    def test_location_replace_not_permitted_status_importing(self):
1870
+        self._test_update_locations_status('importing', 'replace')
1871
+
1872
+    def test_location_replace_not_permitted_status_uploading(self):
1873
+        self._test_update_locations_status('uploading', 'replace')
1874
+
1857 1875
     def test_update_add_locations_insertion(self):
1858 1876
         self.config(show_multiple_locations=True)
1859 1877
         new_location = {'url': '%s/fake_location' % BASE_URI, 'metadata': {}}

Loading…
Cancel
Save