Commit 73375f5c authored by Alex Dadgar's avatar Alex Dadgar
Browse files

fix api job tests

parent 78b2c638
Showing with 4 additions and 16 deletions
+4 -16
......@@ -25,9 +25,6 @@ func TestJobs_Register(t *testing.T) {
if err != nil {
t.Fatalf("err: %s", err)
}
if qm.LastIndex != 0 {
t.Fatalf("bad index: %d", qm.LastIndex)
}
if n := len(resp); n != 0 {
t.Fatalf("expected 0 jobs, got: %d", n)
}
......@@ -653,9 +650,6 @@ func TestJobs_EnforceRegister(t *testing.T) {
if err != nil {
t.Fatalf("err: %s", err)
}
if qm.LastIndex != 0 {
t.Fatalf("bad index: %d", qm.LastIndex)
}
if n := len(resp); n != 0 {
t.Fatalf("expected 0 jobs, got: %d", n)
}
......@@ -835,13 +829,10 @@ func TestJobs_PrefixList(t *testing.T) {
jobs := c.Jobs()
// Listing when nothing exists returns empty
results, qm, err := jobs.PrefixList("dummy")
results, _, err := jobs.PrefixList("dummy")
if err != nil {
t.Fatalf("err: %s", err)
}
if qm.LastIndex != 0 {
t.Fatalf("bad index: %d", qm.LastIndex)
}
if n := len(results); n != 0 {
t.Fatalf("expected 0 jobs, got: %d", n)
}
......@@ -856,7 +847,7 @@ func TestJobs_PrefixList(t *testing.T) {
// Query the job again and ensure it exists
// Listing when nothing exists returns empty
results, qm, err = jobs.PrefixList((*job.ID)[:1])
results, _, err = jobs.PrefixList((*job.ID)[:1])
if err != nil {
t.Fatalf("err: %s", err)
}
......@@ -874,13 +865,10 @@ func TestJobs_List(t *testing.T) {
jobs := c.Jobs()
// Listing when nothing exists returns empty
results, qm, err := jobs.List(nil)
results, _, err := jobs.List(nil)
if err != nil {
t.Fatalf("err: %s", err)
}
if qm.LastIndex != 0 {
t.Fatalf("bad index: %d", qm.LastIndex)
}
if n := len(results); n != 0 {
t.Fatalf("expected 0 jobs, got: %d", n)
}
......@@ -895,7 +883,7 @@ func TestJobs_List(t *testing.T) {
// Query the job again and ensure it exists
// Listing when nothing exists returns empty
results, qm, err = jobs.List(nil)
results, _, err = jobs.List(nil)
if err != nil {
t.Fatalf("err: %s", err)
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment