-
Notifications
You must be signed in to change notification settings - Fork 974
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
[TEST] Use tests from corresponding ES version #649
[TEST] Use tests from corresponding ES version #649
Conversation
util/RestSpecRunner.php
Outdated
@@ -26,6 +26,21 @@ | |||
echo "Update elasticsearch submodule\n"; | |||
$git->fetchAll(array('verbose' => true)); | |||
|
|||
$hash = $_SERVER['TEST_BUILD_REF']; | |||
$out = []; | |||
exec('./elasticsearch-*/bin/elasticsearch --version', $out); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It returns this: Version: 6.0.0-rc1-SNAPSHOT, Build: 6f57a84/2017-09-01T18:07:02.565Z, JVM: 1.8.0_144
util/RestSpecRunner.php
Outdated
var_dump($version); | ||
|
||
$matches = []; | ||
preg_match('~Version: .*, Build: (?P<hash>.*)\/.*~', $version, $matches); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this parses out the hash 6f57a84
1350a80
to
70bc83c
Compare
70bc83c
to
ca1f589
Compare
@polyfractal R4R (I recommend reading the commits, not the unified diff) |
ping @polyfractal ;-) |
Heya :) Just FYI, it's gonna be a slow month here: I'm in Toronto atm for an Elasticon tour, then doing a bunch of support next week, then vacation and finally an all-engineering meeting in Berlin. Business should return to normal end of October, although I'll try to slot in PRs when I get a chance before vacation next week. Just wanted to let you know for when things go really quiet soon :) |
Thanks for letting me know! Enjoy your vacation 🌴 🏖 |
This would help ALL of the other commits get verified I believe! :) |
I'm back from holiday + a work trip, so things should get moving again once I un-bury my inbox :) |
I re-ran the build and it passes (against ES 6.0.0-rc1) |
Awesome, thanks @mhujer! I got roped into a last minute training last week and need to triage my inbox today, but I'm designating tomorrow as PHP client day to work on PRs/Issues Thanks for the patience :) |
So much ❤️ :) |
* [TEST] Drop ES 5.5 from TravisCI build matrix * [TEST] run tests for exactly same version the server has * [Travis] allow_failures on ES 6.x
This changes the build so it checks out the very same version of the tests as the ES instance.
TODO:
version.build_hash
(also safer than parsing the output).github/CONTRIBUTING.md
- it references TEST_BUILD_REFIt passed for ES 6.0.