This commit is contained in:
Alex Dadgar 2016-12-18 16:54:12 -08:00
parent 4e8035756b
commit 5d48c492a4
1 changed files with 4 additions and 7 deletions

View File

@ -217,13 +217,10 @@ func TestHTTP_JobQuery_Payload(t *testing.T) {
compressed := snappy.Encode(nil, expected)
job.Payload = compressed
args := structs.JobRegisterRequest{
Job: job,
WriteRequest: structs.WriteRequest{Region: "global"},
}
var resp structs.JobRegisterResponse
if err := s.Agent.RPC("Job.Register", &args, &resp); err != nil {
t.Fatalf("err: %v", err)
// Directly manipulate the state
state := s.Agent.server.State()
if err := state.UpsertJob(1000, job); err != nil {
t.Fatalf("Failed to upsert job: %v", err)
}
// Make the HTTP request