Add tests for new feature
This commit is contained in:
parent
c5a207416a
commit
d0704e526a
9 changed files with 42 additions and 1 deletions
10
.kitchen.yml
10
.kitchen.yml
|
|
@ -55,6 +55,14 @@ verifier:
|
||||||
ruby_bindir: '/usr/bin'
|
ruby_bindir: '/usr/bin'
|
||||||
|
|
||||||
suites:
|
suites:
|
||||||
- name: default
|
- name: standard
|
||||||
|
provisioner:
|
||||||
|
playbook: test/integration/standard.yml
|
||||||
run_list:
|
run_list:
|
||||||
attributes:
|
attributes:
|
||||||
|
- name: package
|
||||||
|
run_list:
|
||||||
|
attributes:
|
||||||
|
provisioner:
|
||||||
|
playbook: test/integration/package.yml
|
||||||
|
|
||||||
|
|
|
||||||
6
test/integration/package.yml
Normal file
6
test/integration/package.yml
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
- name: Elasticsearch Package tests
|
||||||
|
hosts: localhost
|
||||||
|
roles:
|
||||||
|
- elasticsearch
|
||||||
|
vars:
|
||||||
22
test/integration/package/serverspec/default_spec.rb
Normal file
22
test/integration/package/serverspec/default_spec.rb
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
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
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
roles:
|
roles:
|
||||||
- elasticsearch
|
- elasticsearch
|
||||||
vars:
|
vars:
|
||||||
|
es_use_repository: "true"
|
||||||
es_plugins:
|
es_plugins:
|
||||||
- plugin: lmenezes/elasticsearch-kopf
|
- plugin: lmenezes/elasticsearch-kopf
|
||||||
version: master
|
version: master
|
||||||
2
test/integration/standard/serverspec/spec_helper.rb
Normal file
2
test/integration/standard/serverspec/spec_helper.rb
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
require 'serverspec'
|
||||||
|
set :backend, :exec
|
||||||
2
test/integration/standard/standard.yml
Normal file
2
test/integration/standard/standard.yml
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
---
|
||||||
|
- host: test-kitchen
|
||||||
Loading…
Add table
Add a link
Reference in a new issue