mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-08-18 22:37:52 +00:00
Currently all podman machine rm errors in AfterEach were ignored. This means some leaked and caused issues later on, see #22844. To fix it first rework the logic to only remove machines when needed at the place were they are created using DeferCleanup(), however DeferCleanup() does not work well together with AfterEach() as it always run AfterEach() before DeferCleanup(). As AfterEach() deletes the dir the podman machine rm call can not be done afterwards. As such migrate all cleanup to use DeferCleanup() and while I have to touch this fix the code to remove the per file duplciation and define the setup/cleanup once in the global scope. Signed-off-by: Paul Holzinger <pholzing@redhat.com> |
||
|---|---|---|
| .. | ||
| basic_test.go | ||
| config_basic_test.go | ||
| config_darwin_test.go | ||
| config_info_test.go | ||
| config_init_test.go | ||
| config_inspect_test.go | ||
| config_linux_test.go | ||
| config_list_test.go | ||
| config_os_apply_test.go | ||
| config_reset_test.go | ||
| config_rm_test.go | ||
| config_set_test.go | ||
| config_ssh_test.go | ||
| config_start_test.go | ||
| config_stop_test.go | ||
| config_system_connection_list_test.go | ||
| config_test.go | ||
| config_unix_test.go | ||
| config_windows_test.go | ||
| info_test.go | ||
| init_test.go | ||
| init_windows_test.go | ||
| inspect_test.go | ||
| list_test.go | ||
| machine_pull_test.go | ||
| machine_test.go | ||
| machine_wsl_test.go | ||
| os_test.go | ||
| proxy_test.go | ||
| pull_test.go | ||
| README.md | ||
| reset_test.go | ||
| rm_test.go | ||
| set_test.go | ||
| ssh_test.go | ||
| start_test.go | ||
| stop_test.go | ||
Working README for running the machine tests
Note: you must not have any machines defined before running tests
Linux
QEMU
make localmachine
Microsoft Windows
Hyper-V
- Open a powershell as admin
- $env:CONTAINERS_MACHINE_PROVIDER="hyperv"
./winmake localmachine
Note: To run specific test files, add the test files to the end of the winmake command:
./winmake localmachine "basic_test.go start_test.go"
WSL
- Open a powershell as a regular user
- Build and copy win-sshproxy into bin/
./winmake localmachine
Note: To run specific test files, add the test files to the end of the winmake command:
./winmake localmachine "basic_test.go start_test.go"
macOS
Apple Hypervisor
make podman-remotemake localmachine(AddFOCUS_FILE=basic_test.goto only run basic test. Or addFOCUS="simple init with start"to only run one test case)
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.