mirror of
				https://github.com/containers/podman.git
				synced 2025-10-30 09:25:59 +08:00 
			
		
		
		
	 e7390f30b9
			
		
	
	e7390f30b9
	
	
	
		
			
			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>
		
			
				
	
	
		
			18 lines
		
	
	
		
			377 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			18 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"})
 | |
| }
 |