Updated changelog and fixed tests

This commit is contained in:
Diptanu Choudhury 2016-12-20 11:32:17 -08:00
parent 6c11f38cb0
commit 9cdd576720
6 changed files with 37 additions and 35 deletions

View File

@ -1,15 +1,17 @@
## 0.5.3 (Unreleased)
IMPROVEMENTS:
* cli: Defaulting to showing allocations which belong to currently registered
job [GH-2032]
* client: Garbage collect Allocation Runners to free up disk resouces
[GH-2081]
BUG FIXES:
* driver/docker: Add support for network aliases [GH-1980]
* driver/docker: Fix Docker auth/logging interprelation [GH-2063, GH-2130]
## 0.5.2 (Unreleased)
IMPROVEMENTS:
* client: Garbage collect Allocation Runners to free up disk resouces
[GH-2081]
BUG FIXES:
* client: Fixed a race condition and remove panic when handling duplicate
allocations [GH-2096]

View File

@ -233,7 +233,7 @@ func TestJobs_Allocations(t *testing.T) {
jobs := c.Jobs()
// Looking up by a non-existent job returns nothing
allocs, qm, err := jobs.Allocations("job1", nil)
allocs, qm, err := jobs.Allocations("job1", true, nil)
if err != nil {
t.Fatalf("err: %s", err)
}

View File

@ -111,7 +111,7 @@ func TestAllocStatusCommand_Run(t *testing.T) {
}
// get an alloc id
allocId1 := ""
if allocs, _, err := client.Jobs().Allocations(jobID, nil); err == nil {
if allocs, _, err := client.Jobs().Allocations(jobID, false, nil); err == nil {
if len(allocs) > 0 {
allocId1 = allocs[0].ID
}

View File

@ -683,11 +683,11 @@ func TestClientEndpoint_Drain_Down(t *testing.T) {
// Wait for the scheduler to create an allocation
testutil.WaitForResult(func() (bool, error) {
allocs, err := s1.fsm.state.AllocsByJob(job.ID)
allocs, err := s1.fsm.state.AllocsByJob(job.ID, true)
if err != nil {
return false, err
}
allocs1, err := s1.fsm.state.AllocsByJob(job1.ID)
allocs1, err := s1.fsm.state.AllocsByJob(job1.ID, true)
if err != nil {
return false, err
}

View File

@ -67,7 +67,7 @@ func TestServiceSched_JobRegister(t *testing.T) {
}
// Lookup the allocations by JobID
out, err := h.State.AllocsByJob(job.ID)
out, err := h.State.AllocsByJob(job.ID, false)
noErr(t, err)
// Ensure all allocations placed
@ -215,7 +215,7 @@ func TestServiceSched_JobRegister_DiskConstraints(t *testing.T) {
}
// Lookup the allocations by JobID
out, err := h.State.AllocsByJob(job.ID)
out, err := h.State.AllocsByJob(job.ID, false)
noErr(t, err)
// Ensure only one allocation was placed
@ -270,7 +270,7 @@ func TestServiceSched_JobRegister_Annotate(t *testing.T) {
}
// Lookup the allocations by JobID
out, err := h.State.AllocsByJob(job.ID)
out, err := h.State.AllocsByJob(job.ID, false)
noErr(t, err)
// Ensure all allocations placed
@ -335,7 +335,7 @@ func TestServiceSched_JobRegister_CountZero(t *testing.T) {
}
// Lookup the allocations by JobID
out, err := h.State.AllocsByJob(job.ID)
out, err := h.State.AllocsByJob(job.ID, false)
noErr(t, err)
// Ensure no allocations placed
@ -561,7 +561,7 @@ func TestServiceSched_JobRegister_FeasibleAndInfeasibleTG(t *testing.T) {
}
// Ensure two allocations placed
out, err := h.State.AllocsByJob(job.ID)
out, err := h.State.AllocsByJob(job.ID, false)
noErr(t, err)
if len(out) != 2 {
t.Fatalf("bad: %#v", out)
@ -680,7 +680,7 @@ func TestServiceSched_Plan_Partial_Progress(t *testing.T) {
}
// Lookup the allocations by JobID
out, err := h.State.AllocsByJob(job.ID)
out, err := h.State.AllocsByJob(job.ID, false)
noErr(t, err)
// Ensure only one allocations placed
@ -800,7 +800,7 @@ func TestServiceSched_EvaluateBlockedEval_Finished(t *testing.T) {
}
// Lookup the allocations by JobID
out, err := h.State.AllocsByJob(job.ID)
out, err := h.State.AllocsByJob(job.ID, false)
noErr(t, err)
// Ensure all allocations placed
@ -908,7 +908,7 @@ func TestServiceSched_JobModify(t *testing.T) {
}
// Lookup the allocations by JobID
out, err := h.State.AllocsByJob(job.ID)
out, err := h.State.AllocsByJob(job.ID, false)
noErr(t, err)
// Ensure all allocations placed
@ -999,7 +999,7 @@ func TestServiceSched_JobModify_IncrCount_NodeLimit(t *testing.T) {
}
// Lookup the allocations by JobID
out, err := h.State.AllocsByJob(job.ID)
out, err := h.State.AllocsByJob(job.ID, false)
noErr(t, err)
// Ensure all allocations placed
@ -1095,7 +1095,7 @@ func TestServiceSched_JobModify_CountZero(t *testing.T) {
}
// Lookup the allocations by JobID
out, err := h.State.AllocsByJob(job.ID)
out, err := h.State.AllocsByJob(job.ID, false)
noErr(t, err)
// Ensure all allocations placed
@ -1283,7 +1283,7 @@ func TestServiceSched_JobModify_InPlace(t *testing.T) {
}
// Lookup the allocations by JobID
out, err := h.State.AllocsByJob(job.ID)
out, err := h.State.AllocsByJob(job.ID, false)
noErr(t, err)
// Ensure all allocations placed
@ -1350,7 +1350,7 @@ func TestServiceSched_JobDeregister(t *testing.T) {
}
// Lookup the allocations by JobID
out, err := h.State.AllocsByJob(job.ID)
out, err := h.State.AllocsByJob(job.ID, false)
noErr(t, err)
// Ensure that the job field on the allocation is still populated
@ -1560,7 +1560,7 @@ func TestServiceSched_NodeDrain(t *testing.T) {
}
// Lookup the allocations by JobID
out, err := h.State.AllocsByJob(job.ID)
out, err := h.State.AllocsByJob(job.ID, false)
noErr(t, err)
// Ensure all allocations placed
@ -1829,7 +1829,7 @@ func TestServiceSched_RetryLimit(t *testing.T) {
}
// Lookup the allocations by JobID
out, err := h.State.AllocsByJob(job.ID)
out, err := h.State.AllocsByJob(job.ID, false)
noErr(t, err)
// Ensure no allocations placed
@ -1882,7 +1882,7 @@ func TestBatchSched_Run_CompleteAlloc(t *testing.T) {
}
// Lookup the allocations by JobID
out, err := h.State.AllocsByJob(job.ID)
out, err := h.State.AllocsByJob(job.ID, false)
noErr(t, err)
// Ensure no allocations placed
@ -1935,7 +1935,7 @@ func TestBatchSched_Run_DrainedAlloc(t *testing.T) {
}
// Lookup the allocations by JobID
out, err := h.State.AllocsByJob(job.ID)
out, err := h.State.AllocsByJob(job.ID, false)
noErr(t, err)
// Ensure a replacement alloc was placed.
@ -1987,7 +1987,7 @@ func TestBatchSched_Run_FailedAlloc(t *testing.T) {
}
// Lookup the allocations by JobID
out, err := h.State.AllocsByJob(job.ID)
out, err := h.State.AllocsByJob(job.ID, false)
noErr(t, err)
// Ensure a replacement alloc was placed.
@ -2105,7 +2105,7 @@ func TestBatchSched_ReRun_SuccessfullyFinishedAlloc(t *testing.T) {
}
// Lookup the allocations by JobID
out, err := h.State.AllocsByJob(job.ID)
out, err := h.State.AllocsByJob(job.ID, false)
noErr(t, err)
// Ensure no replacement alloc was placed.

View File

@ -58,7 +58,7 @@ func TestSystemSched_JobRegister(t *testing.T) {
}
// Lookup the allocations by JobID
out, err := h.State.AllocsByJob(job.ID)
out, err := h.State.AllocsByJob(job.ID, false)
noErr(t, err)
// Ensure all allocations placed
@ -182,7 +182,7 @@ func TestSystemSched_JobRegister_EphemeralDiskConstraint(t *testing.T) {
}
// Lookup the allocations by JobID
out, err := h.State.AllocsByJob(job.ID)
out, err := h.State.AllocsByJob(job.ID, false)
noErr(t, err)
// Ensure all allocations placed
@ -205,7 +205,7 @@ func TestSystemSched_JobRegister_EphemeralDiskConstraint(t *testing.T) {
t.Fatalf("err: %v", err)
}
out, err = h1.State.AllocsByJob(job1.ID)
out, err = h1.State.AllocsByJob(job1.ID, false)
noErr(t, err)
if len(out) != 0 {
t.Fatalf("bad: %#v", out)
@ -319,7 +319,7 @@ func TestSystemSched_JobRegister_Annotate(t *testing.T) {
}
// Lookup the allocations by JobID
out, err := h.State.AllocsByJob(job.ID)
out, err := h.State.AllocsByJob(job.ID, false)
noErr(t, err)
// Ensure all allocations placed
@ -430,7 +430,7 @@ func TestSystemSched_JobRegister_AddNode(t *testing.T) {
}
// Lookup the allocations by JobID
out, err := h.State.AllocsByJob(job.ID)
out, err := h.State.AllocsByJob(job.ID, false)
noErr(t, err)
// Ensure all allocations placed
@ -558,7 +558,7 @@ func TestSystemSched_JobModify(t *testing.T) {
}
// Lookup the allocations by JobID
out, err := h.State.AllocsByJob(job.ID)
out, err := h.State.AllocsByJob(job.ID, false)
noErr(t, err)
// Ensure all allocations placed
@ -746,7 +746,7 @@ func TestSystemSched_JobModify_InPlace(t *testing.T) {
}
// Lookup the allocations by JobID
out, err := h.State.AllocsByJob(job.ID)
out, err := h.State.AllocsByJob(job.ID, false)
noErr(t, err)
// Ensure all allocations placed
@ -822,7 +822,7 @@ func TestSystemSched_JobDeregister(t *testing.T) {
}
// Lookup the allocations by JobID
out, err := h.State.AllocsByJob(job.ID)
out, err := h.State.AllocsByJob(job.ID, false)
noErr(t, err)
// Ensure no remaining allocations
@ -1094,7 +1094,7 @@ func TestSystemSched_RetryLimit(t *testing.T) {
}
// Lookup the allocations by JobID
out, err := h.State.AllocsByJob(job.ID)
out, err := h.State.AllocsByJob(job.ID, false)
noErr(t, err)
// Ensure no allocations placed