summaryrefslogtreecommitdiff
path: root/openstackclient/tests/unit/compute
diff options
context:
space:
mode:
authorHironori Shiina <shiina.hironori@jp.fujitsu.com>2016-08-11 00:02:29 +0900
committerHironori Shiina <shiina.hironori@jp.fujitsu.com>2016-09-11 21:48:23 +0900
commitd6f99b721d3e3978fd6a5438bdacefd5840d3b02 (patch)
tree7ece21caace8b7eae5379572a87042c600d9112c /openstackclient/tests/unit/compute
parentd2273ecea5d540f4dacc89772870722355f2492f (diff)
downloadpython-openstackclient-d6f99b721d3e3978fd6a5438bdacefd5840d3b02.tar.gz
Fix regular expression for uptime in hypervisor show
Hypervisor show command has a few bugs as follows. - It doesn't trim an extra whitespace in the head of uptime information. - It doesn't display uptime information when the number of user is 1. This patch fixes the regular expression to match uptime information. Change-Id: Ic2f7fd9a9274466717084a0886f95f78e98a9007 Closes-Bug: 1611809
Diffstat (limited to 'openstackclient/tests/unit/compute')
-rw-r--r--openstackclient/tests/unit/compute/v2/test_hypervisor.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/openstackclient/tests/unit/compute/v2/test_hypervisor.py b/openstackclient/tests/unit/compute/v2/test_hypervisor.py
index d94a107c..02ac6ba3 100644
--- a/openstackclient/tests/unit/compute/v2/test_hypervisor.py
+++ b/openstackclient/tests/unit/compute/v2/test_hypervisor.py
@@ -159,10 +159,12 @@ class TestHypervisorShow(TestHypervisor):
'free_disk_gb',
'free_ram_mb',
'host_ip',
+ 'host_time',
'hypervisor_hostname',
'hypervisor_type',
'hypervisor_version',
'id',
+ 'load_average',
'local_gb',
'local_gb_used',
'memory_mb',
@@ -172,6 +174,8 @@ class TestHypervisorShow(TestHypervisor):
'service_id',
'state',
'status',
+ 'uptime',
+ 'users',
'vcpus',
'vcpus_used',
)
@@ -183,10 +187,12 @@ class TestHypervisorShow(TestHypervisor):
50,
1024,
'192.168.0.10',
+ '01:28:24',
self.hypervisor.hypervisor_hostname,
'QEMU',
2004001,
self.hypervisor.id,
+ '0.94, 0.62, 0.50',
50,
0,
1024,
@@ -196,6 +202,8 @@ class TestHypervisorShow(TestHypervisor):
1,
'up',
'enabled',
+ '3 days, 11:15',
+ '1',
4,
0,
)