Fix spread e2e test
This commit is contained in:
parent
79bd9770f2
commit
df8b9ced10
|
@ -5,6 +5,7 @@ import (
|
|||
|
||||
_ "github.com/hashicorp/nomad/e2e/affinities"
|
||||
_ "github.com/hashicorp/nomad/e2e/example"
|
||||
_ "github.com/hashicorp/nomad/e2e/spread"
|
||||
)
|
||||
|
||||
func TestE2E(t *testing.T) {
|
||||
|
|
|
@ -36,8 +36,9 @@ func (tc *BasicSpreadStruct) TestEvenSpread(f *framework.F) {
|
|||
job, err := jobspec.ParseFile("spread/input/spread1.nomad")
|
||||
require := require.New(f.T())
|
||||
require.Nil(err)
|
||||
jobId := uuid.Generate()
|
||||
job.ID = helper.StringToPtr("spr" + jobId[0:8])
|
||||
uuid := uuid.Generate()
|
||||
jobId := "spr" + uuid[0:8]
|
||||
job.ID = helper.StringToPtr(jobId)
|
||||
|
||||
tc.jobIds = append(tc.jobIds, jobId)
|
||||
|
||||
|
@ -89,8 +90,9 @@ func (tc *BasicSpreadStruct) TestMultipleSpreads(f *framework.F) {
|
|||
job, err := jobspec.ParseFile("spread/input/spread2.nomad")
|
||||
require := require.New(f.T())
|
||||
require.Nil(err)
|
||||
jobId := uuid.Generate()
|
||||
job.ID = helper.StringToPtr("spr" + jobId[0:8])
|
||||
uuid := uuid.Generate()
|
||||
jobId := "spr" + uuid[0:8]
|
||||
job.ID = helper.StringToPtr(jobId)
|
||||
|
||||
tc.jobIds = append(tc.jobIds, jobId)
|
||||
|
||||
|
@ -142,13 +144,10 @@ func (tc *BasicSpreadStruct) TestMultipleSpreads(f *framework.F) {
|
|||
expectedDcToAllocs["dc2"] = 5
|
||||
require.Equal(expectedDcToAllocs, dcToAllocs)
|
||||
|
||||
/*
|
||||
TODO(preetha): known failure that needs investigation
|
||||
expectedRackToAllocs := make(map[string]int)
|
||||
expectedRackToAllocs["r1"] = 5
|
||||
expectedRackToAllocs["r2"] = 5
|
||||
expectedRackToAllocs["r1"] = 7
|
||||
expectedRackToAllocs["r2"] = 3
|
||||
require.Equal(expectedRackToAllocs, rackToAllocs)
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue