mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-08-06 17:05:48 +00:00
Allow podman machine set to change CPUs, Memory and Disk size of a QEMU machine after its been created. Disk size can only be increased. If one setting fails to be changed, the other settings will still be applied. Signed-off-by: Ashley Cui <acui@redhat.com>
17 lines
377 B
Go
17 lines
377 B
Go
package qemu
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestEditCmd(t *testing.T) {
|
|
vm := new(MachineVM)
|
|
vm.CmdLine = []string{"command", "-flag", "value"}
|
|
|
|
vm.editCmdLine("-flag", "newvalue")
|
|
vm.editCmdLine("-anotherflag", "anothervalue")
|
|
|
|
require.Equal(t, vm.CmdLine, []string{"command", "-flag", "newvalue", "-anotherflag", "anothervalue"})
|
|
}
|