Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix _source query in integration test. #13813

Merged
merged 3 commits into from
Oct 2, 2019

Conversation

urso
Copy link

@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
Contributor

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

Copy link
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
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
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
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
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
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