diff options
| author | Abhishek Kekane <akekane@redhat.com> | 2018-05-30 09:38:37 +0000 |
|---|---|---|
| committer | Abhishek Kekane <akekane@redhat.com> | 2018-07-24 10:54:18 +0000 |
| commit | 71bfd7bfad045a88811ef2868601ee72fc8667e3 (patch) | |
| tree | 8969c8dad80c025c0c644af88dfe27ca4313ed0a /glanceclient/tests/unit | |
| parent | 71abbfca2a5927d19ad5a7187bb2112e907b301a (diff) | |
| download | python-glanceclient-71bfd7bfad045a88811ef2868601ee72fc8667e3.tar.gz | |
Add multi-store support
Added multi-store support. User can now use '--backend'
option to pass desired store while creating, uploading or
importing image to speific store backend.
Added new command 'stores-info' which will return available
stores information to the user.
Related to blueprint multi-store
Change-Id: I7370094fc4ed47205b5a86a18b22aaa7b9457e5b
Diffstat (limited to 'glanceclient/tests/unit')
| -rw-r--r-- | glanceclient/tests/unit/v2/test_shell_v2.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/glanceclient/tests/unit/v2/test_shell_v2.py b/glanceclient/tests/unit/v2/test_shell_v2.py index f2f30e0..19e176f 100644 --- a/glanceclient/tests/unit/v2/test_shell_v2.py +++ b/glanceclient/tests/unit/v2/test_shell_v2.py @@ -95,6 +95,7 @@ class ShellV2Test(testtools.TestCase): # dict directly, it throws an AttributeError. class Args(object): def __init__(self, entries): + self.backend = None self.__dict__.update(entries) return Args(args) @@ -1102,7 +1103,8 @@ class ShellV2Test(testtools.TestCase): utils.get_data_file = mock.Mock(return_value='testfile') mocked_upload.return_value = None test_shell.do_image_upload(self.gc, args) - mocked_upload.assert_called_once_with('IMG-01', 'testfile', 1024) + mocked_upload.assert_called_once_with('IMG-01', 'testfile', 1024, + backend=None) @mock.patch('glanceclient.common.utils.exit') def test_neg_image_import_not_available(self, mock_utils_exit): @@ -1263,7 +1265,7 @@ class ShellV2Test(testtools.TestCase): mock_import.return_value = None test_shell.do_image_import(self.gc, args) mock_import.assert_called_once_with( - 'IMG-01', 'glance-direct', None) + 'IMG-01', 'glance-direct', None, backend=None) def test_image_import_web_download(self): args = self._make_args( @@ -1281,7 +1283,7 @@ class ShellV2Test(testtools.TestCase): test_shell.do_image_import(self.gc, args) mock_import.assert_called_once_with( 'IMG-01', 'web-download', - 'http://example.com/image.qcow') + 'http://example.com/image.qcow', backend=None) @mock.patch('glanceclient.common.utils.print_image') def test_image_import_no_print_image(self, mocked_utils_print_image): @@ -1299,7 +1301,7 @@ class ShellV2Test(testtools.TestCase): mock_import.return_value = None test_shell.do_image_import(self.gc, args) mock_import.assert_called_once_with( - 'IMG-02', 'glance-direct', None) + 'IMG-02', 'glance-direct', None, backend=None) mocked_utils_print_image.assert_not_called() def test_image_download(self): |
