mirror of
https://github.com/containers/podman.git
synced 2025-06-22 01:48:54 +08:00
applehv: machine tests for stop and rm
change behaviour of stopped a stopped/exited machine to match qemu in that stopping a stopped machine is NOT an error. add condition to machine rm where rm is not run twice due to a logic error [NO NEW TESTS NEEDED] Signed-off-by: Brent Baude <bbaude@redhat.com>
This commit is contained in:
@ -681,7 +681,7 @@ func (m *MacMachine) Stop(name string, opts machine.StopOptions) error {
|
||||
}
|
||||
|
||||
if vmState != machine.Running {
|
||||
return machine.ErrWrongState
|
||||
return nil
|
||||
}
|
||||
|
||||
defer func() {
|
||||
|
@ -94,9 +94,10 @@ func (vf *VfkitHelper) stop(force, wait bool) error {
|
||||
if err := vf.stateChange(define.HardStop); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if err := vf.stateChange(define.Stop); err != nil {
|
||||
return err
|
||||
} else {
|
||||
if err := vf.stateChange(define.Stop); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if !wait {
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user