Merged in feature/jobstatusendpoint (pull request #85)
Job Status Endpoint * edpoint
This commit is contained in:
@@ -193,9 +193,7 @@ func TestProcess(t *testing.T) {
|
||||
})
|
||||
assert.NoError(t, err)
|
||||
|
||||
jRes, err := qService.GetJobWithResponse(ctx, jobRes.JSON201.Id)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, queryservice.INSYNC, jRes.JSON200.Status)
|
||||
WaitForJobStatus(t, ctx, qService, jobRes.JSON201.Id, queryservice.INSYNC)
|
||||
|
||||
location := fmt.Sprintf("%s/%s/%s", clientRes.JSON201.Id, jobRes.JSON201.Id, "object_name")
|
||||
body := strings.NewReader(pdfHelloWorld)
|
||||
@@ -255,7 +253,7 @@ func WaitForJobStatus(t testing.TB, ctx context.Context, service *queryservice.C
|
||||
case <-timeout:
|
||||
require.NoError(t, fmt.Errorf("Timeout waiting for job status to become %s", status))
|
||||
case <-ticker.C:
|
||||
jRes, err := service.GetJobWithResponse(ctx, id)
|
||||
jRes, err := service.GetJobStatusByJobIdWithResponse(ctx, id)
|
||||
if err != nil {
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
|
||||
@@ -42,7 +42,6 @@ func TestJob(t *testing.T) {
|
||||
assert.Equal(t, id, jobRes.JSON200.Id)
|
||||
assert.Equal(t, clientRes.JSON201.Id, jobRes.JSON200.ClientId)
|
||||
assert.False(t, jobRes.JSON200.CanSync)
|
||||
assert.Equal(t, queryservice.INSYNC, jobRes.JSON200.Status)
|
||||
|
||||
updateCanSync := !jobRes.JSON200.CanSync
|
||||
updateRes, err := client.UpdateJobWithResponse(ctx, id, queryservice.JobUpdate{
|
||||
@@ -56,5 +55,8 @@ func TestJob(t *testing.T) {
|
||||
assert.Equal(t, id, jobRes.JSON200.Id)
|
||||
assert.Equal(t, clientRes.JSON201.Id, jobRes.JSON200.ClientId)
|
||||
assert.False(t, jobRes.JSON200.CanSync)
|
||||
assert.Equal(t, queryservice.INSYNC, jobRes.JSON200.Status)
|
||||
|
||||
jobStatusRes, err := client.GetJobStatusByJobIdWithResponse(ctx, id)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, queryservice.INSYNC, jobStatusRes.JSON200.Status)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user