Commit 8a37f83b authored by Valery Sizov's avatar Valery Sizov

spec for Elastic::Indexer

parent 2c627a51
require 'spec_helper'
describe "Indexer" do
it "runs commands" do
expect(Gitlab::Popen).to receive(:popen).with(
array_including('bin/elastic_repo_indexer', '1', 'full_repo_path'),
nil,
hash_including(
'ELASTIC_CONNECTION_INFO' => {
host: Gitlab.config.elasticsearch.host,
port: Gitlab.config.elasticsearch.port
}.to_json,
'RAILS_ENV' => Rails.env,
'FROM_SHA' => '000000',
'TO_SHA' => '1d1f2d'
)
).and_return([[''], 0])
Elastic::Indexer.new.run(1, 'full_repo_path', '000000', '1d1f2d')
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment