Set not created machine state when appropriate

This commit is contained in:
sophia 2022-07-25 15:00:02 -05:00
parent c999147497
commit 7441927f06
2 changed files with 2 additions and 2 deletions

View File

@ -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":

View File

@ -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},
}