mirror of
https://github.com/hashicorp/vagrant.git
synced 2026-05-28 04:36:05 -04:00
Set test target state to created
This commit is contained in:
parent
762fac3ae6
commit
bdf1cfe6bf
1 changed files with 5 additions and 0 deletions
|
|
@ -15,6 +15,7 @@ func projectTargets(t *testing.T, project *Project, numTargets int) (targets []*
|
|||
ResourceId: fmt.Sprintf("id-%d", i),
|
||||
Name: fmt.Sprintf("target-%d", i),
|
||||
Uuid: fmt.Sprintf("uuid-%d", i),
|
||||
State: vagrant_server.Operation_CREATED,
|
||||
})
|
||||
targets = append(targets, tt)
|
||||
}
|
||||
|
|
@ -35,6 +36,10 @@ func TestProjectGetTarget(t *testing.T) {
|
|||
targetOne := TestTarget(t, tp, &vagrant_server.Target{ResourceId: "id-one", Name: "target-one"})
|
||||
targetTwo := TestTarget(t, tp, &vagrant_server.Target{ResourceId: "id-two", Name: "target-two"})
|
||||
|
||||
err := targetOne.Reload()
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, "id-one", targetOne.target.ResourceId)
|
||||
|
||||
// Get by id
|
||||
one, err := tp.Target("id-one", "")
|
||||
require.NoError(t, err)
|
||||
|
|
|
|||
Loading…
Reference in a new issue