Skip to content

Commit

Permalink
[Tests] Reorders checking for valid server
Browse files Browse the repository at this point in the history
  • Loading branch information
picandocodigo committed May 14, 2024
1 parent b28e058 commit df212cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions elasticsearch/spec/integration/characters_escaping_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
require 'spec_helper'

ELASTICSEARCH_URL = ENV['TEST_ES_SERVER'] || "http://localhost:#{(ENV['PORT'] || 9200)}"
raise URI::InvalidURIError unless ELASTICSEARCH_URL =~ /\A#{URI::DEFAULT_PARSER.make_regexp}\z/

require 'spec_helper'

context 'Elasticsearch client' do
let(:client) do
Elasticsearch::Client.new(host: ELASTICSEARCH_URL, user: 'elastic', password: 'changeme')
Expand Down
5 changes: 3 additions & 2 deletions elasticsearch/spec/integration/client_integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
ELASTICSEARCH_URL = ENV['TEST_ES_SERVER'] || "http://localhost:#{(ENV['PORT'] || 9200)}"
raise URI::InvalidURIError unless ELASTICSEARCH_URL =~ /\A#{URI::DEFAULT_PARSER.make_regexp}\z/

require 'spec_helper'
require 'logger'

ELASTICSEARCH_URL = ENV['TEST_ES_SERVER'] || "http://localhost:#{(ENV['PORT'] || 9200)}"
raise URI::InvalidURIError unless ELASTICSEARCH_URL =~ /\A#{URI::DEFAULT_PARSER.make_regexp}\z/

context 'Elasticsearch client' do
let(:logger) { Logger.new($stderr) }

Expand Down

0 comments on commit df212cf

Please sign in to comment.