Test unit for checking update active images
This test unit pretends to cover attempts to upload images with active status. Change-Id: Id557157b30d78af474973a9d385c34aeb8afd0c3 Closes-Bug: #1434306
This commit is contained in:
parent
26280ed58b
commit
42d7548257
|
@ -436,6 +436,21 @@ class ShellStdinHandlingTests(testtools.TestCase):
|
||||||
or self.collected_args[1]['data'] is None
|
or self.collected_args[1]['data'] is None
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def test_image_update_opened_stdin(self):
|
||||||
|
"""Supply glanceclient with a stdin, and perform an image
|
||||||
|
update to an active image. Glanceclient should not allow it.
|
||||||
|
"""
|
||||||
|
|
||||||
|
self.assertRaises(
|
||||||
|
SystemExit,
|
||||||
|
v1shell.do_image_update,
|
||||||
|
self.gc,
|
||||||
|
argparse.Namespace(
|
||||||
|
image='96d2c7e1-de4e-4612-8aa2-ba26610c804e',
|
||||||
|
property={},
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
def test_image_update_data_is_read_from_file(self):
|
def test_image_update_data_is_read_from_file(self):
|
||||||
"""Ensure that data is read from a file."""
|
"""Ensure that data is read from a file."""
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue