Files
podman/pkg/machine/qemu/machine_test.go
Paul Holzinger 33a474286b pkg/machine: add missing build tags to tests
Machine can only run on amd64 and arm64 platforms so we need to make
sure the test are only run on those platforms. We do not have CI checks
for this but it fails in debian build infra since debian supports many
other architectures as well.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-07-04 18:09:30 +02:00

21 lines
472 B
Go

//go:build (amd64 && !windows) || (arm64 && !windows)
// +build amd64,!windows arm64,!windows
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"})
}