gateway: fix api used by GetRunTask

This commit is contained in:
Carlo Mandelli 2019-11-25 14:42:34 +01:00
parent c55f1f2e16
commit 4464c9a6f2
2 changed files with 4 additions and 1 deletions

View File

@ -457,7 +457,7 @@ func (c *Client) GetRun(ctx context.Context, runID string) (*gwapitypes.RunRespo
func (c *Client) GetRunTask(ctx context.Context, runID, taskID string) (*gwapitypes.RunTaskResponse, *http.Response, error) { func (c *Client) GetRunTask(ctx context.Context, runID, taskID string) (*gwapitypes.RunTaskResponse, *http.Response, error) {
task := new(gwapitypes.RunTaskResponse) task := new(gwapitypes.RunTaskResponse)
resp, err := c.getParsedResponse(ctx, "GET", fmt.Sprintf("/run/%s/task/%s", runID, taskID), nil, jsonContent, nil, task) resp, err := c.getParsedResponse(ctx, "GET", fmt.Sprintf("/runs/%s/tasks/%s", runID, taskID), nil, jsonContent, nil, task)
return task, resp, err return task, resp, err
} }

View File

@ -1254,6 +1254,9 @@ func TestDirectRunLogs(t *testing.T) {
if err != nil { if err != nil {
return false, nil return false, nil
} }
if tt.step >= len(t.Steps) {
return true, nil
}
if !t.Steps[tt.step].LogArchived { if !t.Steps[tt.step].LogArchived {
return false, nil return false, nil
} }