e2e utils remove ineffectual assignment of allocs

This commit is contained in:
Lang Martin
2019-05-20 15:10:32 -04:00
parent 78b9aeffa2
commit 3a3c4426bb

View File

@@ -78,12 +78,13 @@ func RegisterAllocs(t *testing.T, nomadClient *api.Client, jobFile string, jobID
}
func RegisterAndWaitForAllocs(t *testing.T, nomadClient *api.Client, jobFile string, jobID string) []*api.AllocationListStub {
// Parse job
require := require.New(t)
allocs := RegisterAllocs(t, nomadClient, jobFile, jobID)
g := NewGomegaWithT(t)
jobs := nomadClient.Jobs()
// Start allocations
RegisterAllocs(t, nomadClient, jobFile, jobID)
// Wrap in retry to wait until placement
g.Eventually(func() []*api.AllocationListStub {
// Look for allocations