mirror of
https://github.com/containers/podman.git
synced 2025-11-01 22:32:50 +08:00
The following PR is the very first step in what will a series of steps to apply a "common" machine configuration file to all providers. Function names, method names, struct names, and field names are all up for debate. The purpose of this PR is to offer a glimpse at the direction we intend to take. This PR also contains temporary structs (i.e. aThing) that are not exported. These are merely placeholders. The configuration work in this PR is also unused of yet. But the code is compiled. Once merged, we can begin the next step of development. [NO NEW TESTS NEEDED] Signed-off-by: Brent Baude <bbaude@redhat.com>
22 lines
547 B
Go
22 lines
547 B
Go
//go:build (amd64 && !windows) || (arm64 && !windows)
|
|
// +build amd64,!windows arm64,!windows
|
|
|
|
package qemu
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/containers/podman/v4/pkg/machine/qemu/command"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestEditCmd(t *testing.T) {
|
|
vm := new(MachineVM)
|
|
vm.CmdLine = command.QemuCmd{"command", "-flag", "value"}
|
|
|
|
vm.editCmdLine("-flag", "newvalue")
|
|
vm.editCmdLine("-anotherflag", "anothervalue")
|
|
|
|
require.Equal(t, vm.CmdLine.Build(), []string{"command", "-flag", "newvalue", "-anotherflag", "anothervalue"})
|
|
}
|