Skip to content

Commit df212cf

Browse files
committed
[Tests] Reorders checking for valid server
1 parent b28e058 commit df212cf

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

elasticsearch/spec/integration/characters_escaping_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17+
require 'spec_helper'
18+
1719
ELASTICSEARCH_URL = ENV['TEST_ES_SERVER'] || "http://localhost:#{(ENV['PORT'] || 9200)}"
1820
raise URI::InvalidURIError unless ELASTICSEARCH_URL =~ /\A#{URI::DEFAULT_PARSER.make_regexp}\z/
1921

20-
require 'spec_helper'
21-
2222
context 'Elasticsearch client' do
2323
let(:client) do
2424
Elasticsearch::Client.new(host: ELASTICSEARCH_URL, user: 'elastic', password: 'changeme')

elasticsearch/spec/integration/client_integration_spec.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17-
ELASTICSEARCH_URL = ENV['TEST_ES_SERVER'] || "http://localhost:#{(ENV['PORT'] || 9200)}"
18-
raise URI::InvalidURIError unless ELASTICSEARCH_URL =~ /\A#{URI::DEFAULT_PARSER.make_regexp}\z/
1917

2018
require 'spec_helper'
2119
require 'logger'
2220

21+
ELASTICSEARCH_URL = ENV['TEST_ES_SERVER'] || "http://localhost:#{(ENV['PORT'] || 9200)}"
22+
raise URI::InvalidURIError unless ELASTICSEARCH_URL =~ /\A#{URI::DEFAULT_PARSER.make_regexp}\z/
23+
2324
context 'Elasticsearch client' do
2425
let(:logger) { Logger.new($stderr) }
2526

0 commit comments

Comments
 (0)