diff options
| author | Huanxuan Ao <huanxuan.ao@easystack.cn> | 2016-05-23 14:04:50 +0800 |
|---|---|---|
| committer | Huanxuan Ao <huanxuan.ao@easystack.cn> | 2016-05-28 13:32:13 +0800 |
| commit | 366adf98c0e28c7538a6d6cb8349eb3033addfda (patch) | |
| tree | 0f4546d53f0d21db1077cc81bc66f322b98edfa1 /functional/tests/compute/v2 | |
| parent | f44416b750fd5ce9b0baa1363a1b99bc2b1e5492 (diff) | |
| download | python-openstackclient-366adf98c0e28c7538a6d6cb8349eb3033addfda.tar.gz | |
Fix functest "test_server_metadata()" in test_sever.py
There is only a functional test for "server set" command
in test_server_metadata(), we also need a functional test
for "server unset" command, so I add it in this patch.
Change-Id: I23c40ac1c5adcc2563d8aa9dcb5551df695e98e3
Diffstat (limited to 'functional/tests/compute/v2')
| -rw-r--r-- | functional/tests/compute/v2/test_server.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/functional/tests/compute/v2/test_server.py b/functional/tests/compute/v2/test_server.py index 6cb82cb0..96c1c1a5 100644 --- a/functional/tests/compute/v2/test_server.py +++ b/functional/tests/compute/v2/test_server.py @@ -129,6 +129,8 @@ class ServerTests(test.TestCase): 1) Boot server in setUp 2) Set properties for server 3) Check server properties in server show output + 4) Unset properties for server + 5) Check server properties in server show output """ self.wait_for_status("ACTIVE") # metadata @@ -138,6 +140,12 @@ class ServerTests(test.TestCase): raw_output = self.openstack('server show ' + self.NAME + opts) self.assertEqual(self.NAME + "\na='b', c='d'\n", raw_output) + raw_output = self.openstack( + 'server unset --property a ' + self.NAME) + opts = self.get_show_opts(["name", "properties"]) + raw_output = self.openstack('server show ' + self.NAME + opts) + self.assertEqual(self.NAME + "\nc='d'\n", raw_output) + def test_server_suspend_resume(self): """Test server suspend and resume commands. |
