spiegel_podman/pkg/machine/e2e
Mario Loriedo 12ea195526 Add new machine test that covers interrupted start command
Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2026-06-24 18:52:15 +02:00
..
scripts Improve platform specific URL handling in podman compose for machines 2024-12-02 20:46:51 +02:00
api_test.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
basic_test.go machine: add test to check config mount 2026-05-11 15:58:03 +02:00
compose_test.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
config_basic_test.go lint: reenable revive unused-parameter check 2025-10-01 10:42:08 -04:00
config_compose_test.go lint: reenable revive unused-parameter check 2025-10-01 10:42:08 -04:00
config_cp_test.go lint: reenable revive unused-parameter check 2025-10-01 10:42:08 -04:00
config_darwin_test.go fake images: windows hyperv 2025-11-12 12:53:42 -06:00
config_freebsd_test.go fake images: windows hyperv 2025-11-12 12:53:42 -06:00
config_help_test.go lint: reenable revive unused-parameter check 2025-10-01 10:42:08 -04:00
config_info_test.go lint: reenable revive unused-parameter check 2025-10-01 10:42:08 -04:00
config_init_test.go Add new flag --import-native-ca for machine init/set 2026-04-01 14:12:30 +02:00
config_inspect_test.go Fix machine inspect test config 2024-01-11 11:42:54 -05:00
config_linux_test.go fake images: windows hyperv 2025-11-12 12:53:42 -06:00
config_list_test.go Machine init --provider 2025-10-29 07:59:34 -05:00
config_os_apply_test.go Error on WSL machine os apply|upgrade 2026-03-23 10:01:53 -05:00
config_reset_test.go lint: reenable revive unused-parameter check 2025-10-01 10:42:08 -04:00
config_rm_test.go Use single persistent ssh key for all machines 2024-01-04 23:47:49 -05:00
config_set_test.go Add new flag --import-native-ca for machine init/set 2026-04-01 14:12:30 +02:00
config_ssh_test.go update golangci-lint to v1.62.0 2024-11-11 14:21:17 +01:00
config_start_test.go Add update-connection to machine start and init 2025-11-04 10:35:28 -06:00
config_stop_test.go enable linter for pkg/machine/e2e 2022-07-21 18:04:10 +02:00
config_system_connection_list_test.go lint: reenable revive unused-parameter check 2025-10-01 10:42:08 -04:00
config_test.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
config_unix_test.go fake images: windows hyperv 2025-11-12 12:53:42 -06:00
config_windows_test.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
cp_test.go enable gofumpt formatter 2025-11-11 12:32:46 +01:00
help_test.go pkg/machine/e2e: improve podman.exe match 2025-01-20 19:50:14 +01:00
info_test.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
init_test.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
init_windows_test.go cleanup: run go fix on pkg/machine for windows 2026-04-29 13:56:01 +05:30
inspect_test.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
list_test.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
machine_pull_test.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
machine_test.go machine: add test to check config mount 2026-05-11 15:58:03 +02:00
os_test.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
proxy_test.go machine: remove SSL_CERT_DIR/SSL_CERT_FILE copy 2026-05-11 15:58:03 +02:00
README.md machine: change default macOS provider to libkrun 2025-11-17 09:32:29 -05:00
reset_test.go Merge pull request #27498 from Luap99/gofumpt 2025-11-12 13:29:45 +00:00
rm_test.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
set_test.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
ssh_test.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
start_test.go Add new machine test that covers interrupted start command 2026-06-24 18:52:15 +02:00
stop_test.go enable gofumpt formatter 2025-11-11 12:32:46 +01:00
test-tls.crt pkg/machine/e2e: add CVE-2025-6032 regression test 2025-06-25 19:27:45 +02:00
test-tls.key pkg/machine/e2e: add CVE-2025-6032 regression test 2025-06-25 19:27:45 +02:00

Running the machine tests

This document is a quick how-to run machine tests. Not all dependencies, like gvproxy are documented. You must install gvproxy in all cases described below.

General notes

Environment must be clean

You must not have any machines defined before running tests. Consider running podman machine reset prior to running tests.

Scoping tests

You can scope tests in the machine suite by adding various incantations of FOCUS=. For example, add FOCUS_FILE=basic_test.go to only run basic test. Or add FOCUS="simple init with start" to only run one test case. For windows, the syntax differs slightly. In windows, executing something like following achieves the same result:

./winmake localmachine "basic_test.go start_test.go"

To focus on one specific test on windows, run ginkgo manually:

$remotetags = "remote exclude_graphdriver_btrfs containers_image_openpgp"
$focus_file = "basic_test.go"
$focus_test = "podman build contexts"
./test/tools/build/ginkgo.exe `
     -v --tags "$remotetags" -timeout=90m --trace --no-color `
     --focus-file  $focus_file `
     --focus "$focus_test" `
     ./pkg/machine/e2e/.

Note that ginkgo.exe is built when running the command winmake.ps1 localmachine so make sure to run it before trying the command above.

Linux

QEMU

  1. make localmachine

Microsoft Windows

Hyper-V

  1. Open a powershell as admin
  2. .\winmake.ps1 podman-remote && .\winmake.ps1 win-gvproxy
  3. $env:CONTAINERS_HELPER_BINARY_DIR="$pwd\bin\windows"
  4. $env:CONTAINERS_MACHINE_PROVIDER="hyperv"
  5. .\winmake localmachine

WSL

  1. Open a powershell as a regular user
  2. .\winmake.ps1 podman-remote && .\winmake.ps1 win-gvproxy
  3. $env:CONTAINERS_HELPER_BINARY_DIR="$pwd\bin\windows"
  4. $env:CONTAINERS_MACHINE_PROVIDER="wsl"
  5. .\winmake localmachine

MacOS

Macs now support two different machine providers: applehv and libkrun. The libkrun provider is the default.

Note: On macOS, an error will occur if the path length of $TMPDIR is longer than 22 characters. Please set the appropriate path to $TMPDIR. Also, if $TMPDIR is empty, /private/tmp will be set.

Apple Hypervisor

  1. brew install vfkit
  2. make podman-remote
  3. export CONTAINERS_MACHINE_PROVIDER="applehv"
  4. make localmachine

Libkrun

  1. brew install krunkit
  2. make podman-remote
  3. make localmachine