Skip to content

Commit

Permalink
fix(tests): Add huge_pages parameter to relevant tests
Browse files Browse the repository at this point in the history
Tests that explicitly check API responses now need to deal with the new
huge_pages parameter.

Signed-off-by: Patrick Roy <[email protected]>
  • Loading branch information
roypat committed Jan 12, 2024
1 parent 35251ca commit ac53626
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tests/framework/vm_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"vcpu_count": 2,
"mem_size_mib": 1024,
"smt": false,
"track_dirty_pages": false
"track_dirty_pages": false,
"huge_pages": "None"
},
"cpu-config": null,
"balloon": null,
Expand Down
7 changes: 6 additions & 1 deletion tests/integration_tests/functional/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,10 @@ def test_api_machine_config(test_microvm_with_api):

# Test invalid mem_size_mib = 0.
with pytest.raises(
RuntimeError, match=re.escape("The memory size (MiB) is invalid.")
RuntimeError,
match=re.escape(
"The memory size (MiB) is either 0, or not a multiple of the configured page size."
),
):
test_microvm.api.machine_config.patch(mem_size_mib=0)

Expand Down Expand Up @@ -1112,6 +1115,7 @@ def test_get_full_config_after_restoring_snapshot(microvm_factory, uvm_nano):
"mem_size_mib": 256,
"smt": True,
"track_dirty_pages": False,
"huge_pages": "None",
}

if cpu_vendor == utils_cpuid.CpuVendor.ARM:
Expand Down Expand Up @@ -1227,6 +1231,7 @@ def test_get_full_config(test_microvm_with_api):
"mem_size_mib": 256,
"smt": False,
"track_dirty_pages": False,
"huge_pages": "None",
}
expected_cfg["cpu-config"] = None
expected_cfg["boot-source"] = {
Expand Down

0 comments on commit ac53626

Please sign in to comment.