Merge pull request #322 from hashicorp/cleanup-target-dir-on-destroy

Set not created machine state when appropriate
This commit is contained in:
Sophia Castellarin 2022-07-25 16:41:31 -05:00 committed by GitHub
commit 0081bb0f9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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},
}