File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed
elasticsearch-api/spec/yaml-test-runner Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 68
68
env :
69
69
RUBY_VERSION : " 3.3"
70
70
STACK_VERSION : 8.16.0-SNAPSHOT
71
+ ES_YAML_TESTS_BRANCH : main
71
72
TRANSPORT_VERSION : " 8.3"
72
73
RUBY_SOURCE : " ruby"
73
74
TEST_SUITE : " platinum"
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ docker run \
36
36
--env " BUILDKITE=true" \
37
37
--env " TRANSPORT_VERSION=${TRANSPORT_VERSION} " \
38
38
--env " STACK_VERSION=${STACK_VERSION} " \
39
+ --env " ES_YAML_TESTS_BRANCH=${ES_YAML_TESTS_BRANCH} " \
39
40
--volume $repo :/usr/src/app \
40
41
--name elasticsearch-ruby \
41
42
--rm \
Original file line number Diff line number Diff line change 55
55
Elasticsearch ::Client . new ( host : host , transport_options : transport_options )
56
56
end
57
57
58
-
59
58
tests_path = File . expand_path ( './tmp' , __dir__ )
60
59
61
60
logger = Logger . new ( $stdout)
62
61
logger . level = Logger ::WARN unless ENV [ 'DEBUG' ]
63
62
64
- Elasticsearch ::Tests ::Downloader ::run ( tests_path )
63
+ # If we're running in a release branch, download the corresponding branch for tests
64
+ current_branch = `git rev-parse --abbrev-ref HEAD` . strip
65
+ branch = current_branch . match ( /[0-9]\. [0-9]+/ ) &.[]( 0 ) || ENV [ 'ES_YAML_TESTS_BRANCH' ] || nil
66
+ Elasticsearch ::Tests ::Downloader ::run ( tests_path , branch )
65
67
Elasticsearch ::Tests ::TestRunner . new ( CLIENT , tests_path , logger ) . run
You can’t perform that action at this time.
0 commit comments