2.0 Support + Plugin Directory Support + Supporting Tests + Defaults Change

This commit is contained in:
Dale McDiarmid 2015-12-13 22:46:50 +00:00
parent 1034995899
commit 86f2bd9a2d
40 changed files with 297 additions and 113 deletions

View file

@ -1,3 +0,0 @@
source 'https://rubygems.org'
gem 'rspec-retry'

View file

@ -1,51 +0,0 @@
require 'spec_helper'
context "basic tests" do
describe user('elasticsearch') do
it { should exist }
end
describe service('node1_elasticsearch') do
it { should be_running }
end
describe package('elasticsearch') do
it { should be_installed }
end
describe file('/etc/elasticsearch/node1/elasticsearch.yml') do
it { should be_file }
it { should be_owned_by 'elasticsearch' }
end
describe file('/etc/elasticsearch/node1/logging.yml') do
it { should be_file }
it { should be_owned_by 'elasticsearch' }
end
describe file('/etc/elasticsearch/node1/elasticsearch.yml') do
it { should contain 'node.name: localhost-node1' }
it { should contain 'cluster.name: elasticsearch' }
it { should contain 'path.conf: /etc/elasticsearch/node1' }
it { should contain 'path.data: /var/lib/elasticsearch/localhost-node1' }
it { should contain 'path.work: /tmp/elasticsearch/localhost-node1' }
it { should contain 'path.logs: /var/log/elasticsearch/localhost-node1' }
end
describe 'Node listening' do
it 'listening in port 9200' do
expect(port 9200).to be_listening
end
end
describe 'plugin' do
it 'should be reported as existing', :retry => 3, :retry_wait => 10 do
command = command('curl -s localhost:9200/_nodes/?plugin | grep kopf')
expect(command.stdout).to match(/kopf/)
expect(command.exit_status).to eq(0)
end
end
end

View file

@ -1,11 +0,0 @@
require 'serverspec'
set :backend, :exec
require 'rspec/retry'
RSpec.configure do |config|
# show retry status in spec process
config.verbose_retry = true
# show exception that triggers a retry if verbose_retry is set to true
config.display_try_failure_messages = true
end

View file

@ -1,2 +0,0 @@
---
- host: test-kitchen