Merge "Do not multiply megabytes with 1024 to get gigabytes."
This commit is contained in:
commit
8527fbfd8b
|
@ -2567,7 +2567,7 @@ class TestInventory(SchedulerReportClientTestCase):
|
|||
},
|
||||
'DISK_GB': {
|
||||
'total': 10,
|
||||
'reserved': CONF.reserved_host_disk_mb * 1024,
|
||||
'reserved': 0, # reserved_host_disk_mb is 0 by default
|
||||
'min_unit': 1,
|
||||
'max_unit': compute_node.local_gb,
|
||||
'step_size': 1,
|
||||
|
@ -2583,6 +2583,8 @@ class TestInventory(SchedulerReportClientTestCase):
|
|||
@mock.patch('nova.scheduler.client.report.SchedulerReportClient.'
|
||||
'put')
|
||||
def test_update_inventory(self, mock_put, mock_get):
|
||||
self.flags(reserved_host_disk_mb=1000)
|
||||
|
||||
# Ensure _update_inventory() returns a list of Inventories objects
|
||||
# after creating or updating the existing values
|
||||
uuid = uuids.compute_node
|
||||
|
@ -2645,7 +2647,7 @@ class TestInventory(SchedulerReportClientTestCase):
|
|||
},
|
||||
'DISK_GB': {
|
||||
'total': 10,
|
||||
'reserved': CONF.reserved_host_disk_mb * 1024,
|
||||
'reserved': 1, # this is ceil for 1000MB
|
||||
'min_unit': 1,
|
||||
'max_unit': compute_node.local_gb,
|
||||
'step_size': 1,
|
||||
|
@ -2691,7 +2693,7 @@ class TestInventory(SchedulerReportClientTestCase):
|
|||
},
|
||||
'DISK_GB': {
|
||||
'total': 10,
|
||||
'reserved': CONF.reserved_host_disk_mb * 1024,
|
||||
'reserved': 0,
|
||||
'min_unit': 1,
|
||||
'max_unit': compute_node.local_gb,
|
||||
'step_size': 1,
|
||||
|
|
Loading…
Reference in New Issue