Skip to content

Fix _source query in integration test.#13813

Merged
urso merged 3 commits intoelastic:masterfrom
urso:fix-api-integration-test
Oct 2, 2019
Merged

Fix _source query in integration test.#13813
urso merged 3 commits intoelastic:masterfrom
urso:fix-api-integration-test

Conversation

@urso
Copy link
Copy Markdown

@urso urso commented Sep 26, 2019

Source queries must be typeless most recently. Update query to <index>/_source/<id> in integration test.

@kaiyan-sheng
Copy link
Copy Markdown
Contributor

waiting to see ci go green, thank you so much for fixing it!

Copy link
Copy Markdown
Member

@andrewkroh andrewkroh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM assuming the libbeat tests go green now. 🍏

@kaiyan-sheng
Copy link
Copy Markdown
Contributor

Seems like two more places will need to be changed:

--- FAIL: TestIndex (0.02s)
    api_integration_test.go:51: Index() returns error: Elasticsearch response: {"error":"Incorrect HTTP method for uri [/beats-test-index-11477/1?refresh=true] and method [PUT], allowed: [POST]","status":405}: 405 Method Not Allowed: {"error":"Incorrect HTTP method for uri [/beats-test-index-11477/1?refresh=true] and method [PUT], allowed: [POST]","status":405}
--- FAIL: TestIngest (0.18s)
    api_integration_test.go:145: Ingest() returns error: Elasticsearch response: {"error":"Incorrect HTTP method for uri [/beats-test-ingest-11477/1?pipeline=beats-test-pipeline-11477&refresh=true] and method [PUT], allowed: [POST]","status":405}: 405 Method Not Allowed: {"error":"Incorrect HTTP method for uri [/beats-test-ingest-11477/1?pipeline=beats-test-pipeline-11477&refresh=true] and method [PUT], allowed: [POST]","status":405}
FAIL

@urso
Copy link
Copy Markdown
Author

urso commented Sep 26, 2019

This is same location as before. But something else seems to have changed in ES as well. Looks like I'm going down a rabbid hole here. Just have some patience and CI will be green again :)

@urso urso mentioned this pull request Sep 27, 2019
@cwurm
Copy link
Copy Markdown
Contributor

cwurm commented Sep 30, 2019

I think it's failing because only the get APIs have been made typeless in Elasticsearch (elastic/elasticsearch#46931), but not the ingest APIs (still has {type} here).

@ph
Copy link
Copy Markdown
Contributor

ph commented Oct 1, 2019

@cwurm I think you are correct, after looking at the code seems we have a divergence between the ingest and the GET side.

@urso
Copy link
Copy Markdown
Author

urso commented Oct 1, 2019

@cwurm Thanks, that seems to be the issue. I update the source query. Test runs through locally. Let's see what CI says.

@urso urso changed the title Do not set document type Fix _source query in integration test. Oct 1, 2019
@urso urso merged commit 5aed602 into elastic:master Oct 2, 2019
@urso urso deleted the fix-api-integration-test branch October 2, 2019 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants