gateway: fix api used by GetRunTask
This commit is contained in:
parent
c55f1f2e16
commit
4464c9a6f2
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue