mirror of
https://github.com/containers/podman.git
synced 2025-06-23 02:18:13 +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 {
|
if vmState != machine.Running {
|
||||||
return machine.ErrWrongState
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
|
@ -94,10 +94,11 @@ func (vf *VfkitHelper) stop(force, wait bool) error {
|
|||||||
if err := vf.stateChange(define.HardStop); err != nil {
|
if err := vf.stateChange(define.HardStop); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
if err := vf.stateChange(define.Stop); err != nil {
|
if err := vf.stateChange(define.Stop); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if !wait {
|
if !wait {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user