Set not created machine state when appropriate
This commit is contained in:
parent
c999147497
commit
7441927f06
@ -242,7 +242,7 @@ func (m *Machine) SetMachineState(state *core.MachineState) (err error) {
|
||||
|
||||
switch st.Id {
|
||||
case "not_created":
|
||||
m.target.State = vagrant_server.Operation_UNKNOWN
|
||||
m.target.State = vagrant_server.Operation_NOT_CREATED
|
||||
case "running":
|
||||
m.target.State = vagrant_server.Operation_CREATED
|
||||
case "poweroff":
|
||||
|
||||
@ -272,7 +272,7 @@ func TestMachineSetState(t *testing.T) {
|
||||
|
||||
tests := []test{
|
||||
{id: "running", state: vagrant_server.Operation_CREATED},
|
||||
{id: "not_created", state: vagrant_server.Operation_UNKNOWN},
|
||||
{id: "not_created", state: vagrant_server.Operation_NOT_CREATED},
|
||||
{id: "whakhgldksj", state: vagrant_server.Operation_UNKNOWN},
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user