Initial commit for acceptance testing
Uses Kitchen-CI, kitchen-ansible and kitchen-docker components Also uses serverspec. Currently supports: - CentOS 6, 7 - Debian 7, 8 - Ubuntu 14.04
This commit is contained in:
parent
448094608b
commit
f5a5fede0b
7 changed files with 100 additions and 0 deletions
9
test/integration/default.yml
Normal file
9
test/integration/default.yml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
- name: wrapper playbook for kitchen testing "elasticsearch"
|
||||
hosts: localhost
|
||||
roles:
|
||||
- elasticsearch
|
||||
vars:
|
||||
es_plugins:
|
||||
- plugin: lmenezes/elasticsearch-kopf
|
||||
version: master
|
||||
2
test/integration/default/default.yaml
Normal file
2
test/integration/default/default.yaml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
- host: test-kitchen
|
||||
27
test/integration/default/serverspec/default_spec.rb
Normal file
27
test/integration/default/serverspec/default_spec.rb
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
require 'spec_helper'
|
||||
|
||||
context "basic tests" do
|
||||
|
||||
describe user('elasticsearch') do
|
||||
it { should exist }
|
||||
end
|
||||
|
||||
describe service('elasticsearch') do
|
||||
it { should be_running }
|
||||
end
|
||||
|
||||
describe package('elasticsearch') do
|
||||
it { should be_installed }
|
||||
end
|
||||
|
||||
describe file('/etc/elasticsearch/elasticsearch.yml') do
|
||||
it { should be_file }
|
||||
end
|
||||
|
||||
describe command('curl localhost:9200/_nodes/?plugin | grep kopf') do
|
||||
its(:stdout) { should match /kopf/ }
|
||||
its(:exit_status) { should eq 0 }
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
2
test/integration/default/serverspec/spec_helper.rb
Normal file
2
test/integration/default/serverspec/spec_helper.rb
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
require 'serverspec'
|
||||
set :backend, :exec
|
||||
Loading…
Add table
Add a link
Reference in a new issue