This commit is contained in:
Alex Dadgar 2016-12-18 16:54:12 -08:00
parent 4e8035756b
commit 5d48c492a4

View file

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