Merge pull request #186 from camandel/fix_tests_api_delete

gateway: fix api used by GetRunTask
This commit is contained in:
Simone Gotti 2019-11-27 08:52:37 +01:00 committed by GitHub
commit cc70a55a59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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) {
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
}

View File

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