QEMU/KVM virtual machine management via QMP
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(lint): remove redundant test_ function prefixes (E330)

Remove test_ prefix from test function names across test files where
the module name already provides the Test namespace.

+10 -11
+2 -2
test/test_qemu.ml
··· 83 83 | Ok _ -> Alcotest.fail "Expected Success" 84 84 | Error e -> Alcotest.fail e 85 85 86 - let test_success_query_kvm_with_id () = 86 + let test_query_kvm_with_id () = 87 87 (* From docs/interop/qmp-spec.rst -- response with id *) 88 88 let json = 89 89 {|{"return": {"enabled": true, "present": true}, "id": "example"}|} ··· 522 522 Alcotest.test_case "query-status (run-state.json)" `Quick 523 523 test_success_query_status; 524 524 Alcotest.test_case "query-kvm with id (qmp-spec.rst)" `Quick 525 - test_success_query_kvm_with_id; 525 + test_query_kvm_with_id; 526 526 Alcotest.test_case "query-version (control.json)" `Quick 527 527 test_success_query_version; 528 528 Alcotest.test_case "query-name (misc.json)" `Quick test_success_query_name;
+6 -6
test/test_qmp_protocol.ml
··· 167 167 | Ok _ -> () 168 168 | Error e -> Alcotest.failf "roundtrip: %s" e 169 169 170 - let test_command_with_id_and_arguments () = 170 + let test_command_with_id_args () = 171 171 let args = parse_json {|{"protocol": "tcp", "hostname": "localhost"}|} in 172 172 let cmd = Qmp.Command.make ~arguments:args ~id:"migrate-1" "migrate" in 173 173 let json = Qmp.Command.to_json cmd in ··· 284 284 let ts = { Qmp.Timestamp.seconds = 0; microseconds = 0 } in 285 285 Alcotest.(check (float 0.0)) "zero" 0.0 (Qmp.Timestamp.to_float ts) 286 286 287 - let test_timestamp_to_float_only_seconds () = 287 + let test_timestamp_float_seconds () = 288 288 let ts = { Qmp.Timestamp.seconds = 1000; microseconds = 0 } in 289 289 Alcotest.(check (float 0.0)) "seconds only" 1000.0 (Qmp.Timestamp.to_float ts) 290 290 291 - let test_timestamp_to_float_only_microseconds () = 291 + let test_timestamp_float_microseconds () = 292 292 let ts = { Qmp.Timestamp.seconds = 0; microseconds = 500000 } in 293 293 Alcotest.(check (float 0.001)) 294 294 "microseconds only" 0.5 ··· 364 364 Alcotest.test_case "command with arguments" `Quick 365 365 test_command_with_arguments; 366 366 Alcotest.test_case "command with id and arguments" `Quick 367 - test_command_with_id_and_arguments; 367 + test_command_with_id_args; 368 368 Alcotest.test_case "command blockdev-add nested args" `Quick 369 369 test_command_blockdev_add; 370 370 Alcotest.test_case "run_state unknown string" `Quick ··· 383 383 Alcotest.test_case "error Error.pp" `Quick test_error_pp; 384 384 Alcotest.test_case "timestamp zero" `Quick test_timestamp_to_float_zero; 385 385 Alcotest.test_case "timestamp seconds only" `Quick 386 - test_timestamp_to_float_only_seconds; 386 + test_timestamp_float_seconds; 387 387 Alcotest.test_case "timestamp microseconds only" `Quick 388 - test_timestamp_to_float_only_microseconds; 388 + test_timestamp_float_microseconds; 389 389 Alcotest.test_case "timestamp combined" `Quick 390 390 test_timestamp_to_float_combined; 391 391 Alcotest.test_case "timestamp jsont roundtrip" `Quick
+2 -3
test/test_vm.ml
··· 546 546 (string_contains ~sub:"/var/run/qemu/x86-vm.sock" v) 547 547 | None -> Alcotest.fail "missing -qmp" 548 548 549 - let test_no_kernel_no_kernel_args () = 549 + let test_no_kernel_args () = 550 550 (* Without kernel, -kernel/-initrd/-append should not appear *) 551 551 let config = Config.default ~name:"test" in 552 552 let args = Config.to_args config in ··· 630 630 Alcotest.test_case "chardev socket server" `Quick test_chardev_socket; 631 631 Alcotest.test_case "chardev socket client" `Quick test_chardev_client; 632 632 Alcotest.test_case "channel" `Quick test_channel; 633 - Alcotest.test_case "no kernel no args" `Quick 634 - test_no_kernel_no_kernel_args; 633 + Alcotest.test_case "no kernel no args" `Quick test_no_kernel_args; 635 634 Alcotest.test_case "no disks no drive" `Quick test_no_disks_no_drive; 636 635 Alcotest.test_case "multiple disks ordering" `Quick 637 636 test_multiple_disks_ordering;