Skip to content

Commit ac53626

Browse files
committed
fix(tests): Add huge_pages parameter to relevant tests
Tests that explicitly check API responses now need to deal with the new huge_pages parameter. Signed-off-by: Patrick Roy <[email protected]>
1 parent 35251ca commit ac53626

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

tests/framework/vm_config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"vcpu_count": 2,
2222
"mem_size_mib": 1024,
2323
"smt": false,
24-
"track_dirty_pages": false
24+
"track_dirty_pages": false,
25+
"huge_pages": "None"
2526
},
2627
"cpu-config": null,
2728
"balloon": null,

tests/integration_tests/functional/test_api.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,10 @@ def test_api_machine_config(test_microvm_with_api):
400400

401401
# Test invalid mem_size_mib = 0.
402402
with pytest.raises(
403-
RuntimeError, match=re.escape("The memory size (MiB) is invalid.")
403+
RuntimeError,
404+
match=re.escape(
405+
"The memory size (MiB) is either 0, or not a multiple of the configured page size."
406+
),
404407
):
405408
test_microvm.api.machine_config.patch(mem_size_mib=0)
406409

@@ -1112,6 +1115,7 @@ def test_get_full_config_after_restoring_snapshot(microvm_factory, uvm_nano):
11121115
"mem_size_mib": 256,
11131116
"smt": True,
11141117
"track_dirty_pages": False,
1118+
"huge_pages": "None",
11151119
}
11161120

11171121
if cpu_vendor == utils_cpuid.CpuVendor.ARM:
@@ -1227,6 +1231,7 @@ def test_get_full_config(test_microvm_with_api):
12271231
"mem_size_mib": 256,
12281232
"smt": False,
12291233
"track_dirty_pages": False,
1234+
"huge_pages": "None",
12301235
}
12311236
expected_cfg["cpu-config"] = None
12321237
expected_cfg["boot-source"] = {

0 commit comments

Comments
 (0)