Skip to content

Commit 0b09900

Browse files
committed
Bug fix: Update tests as the default amount of memory was increased to 2048M
Commit 2ca1067 increased the default amount of memory to 2048MB. Update the test accordingly. Signed-off-by: Aline Manera <[email protected]>
1 parent f3fd456 commit 0b09900

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

tests/test_template.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -278,12 +278,8 @@ def test_customized_tmpl(self):
278278
self.assertEqual(update_tmpl['cpu_info'], cpu_info_data['cpu_info'])
279279

280280
# Test memory and max memory
281-
# - memory greated than max memory (1024 default on x86
282-
# otherwise 2048)
283-
if os.uname()[4] == 's390x':
284-
req = json.dumps({'memory': {'current': 4096}})
285-
else:
286-
req = json.dumps({'memory': {'current': 2048}})
281+
# - memory greated than max memory
282+
req = json.dumps({'memory': {'current': 4096}})
287283
resp = self.request(new_tmpl_uri, req, 'PUT')
288284
self.assertEqual(400, resp.status)
289285
# - max memory greater than limit: 16TiB to PPC and 4TiB to x86

tests/test_vmtemplate.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,7 @@ def test_to_xml(self):
138138
# max memory tag is not set
139139
self.assertEqual(0, len(xpath_get_text(xml, expr)))
140140
expr = '/domain/memory'
141-
if os.uname()[4] == 's390x':
142-
self.assertEqual(str(2048), xpath_get_text(xml, expr)[0])
143-
else:
144-
self.assertEqual(str(1024), xpath_get_text(xml, expr)[0])
141+
self.assertEqual(str(2048), xpath_get_text(xml, expr)[0])
145142

146143
if hasattr(psutil, 'virtual_memory'):
147144
host_memory = psutil.virtual_memory().total >> 10

0 commit comments

Comments
 (0)