Skip to content

Commit 0504309

Browse files
committed
Merge pull request elastic#27 from electrical/extend_testing
Add tests for new feature
2 parents 25b10ab + d0704e5 commit 0504309

File tree

9 files changed

+42
-1
lines changed

9 files changed

+42
-1
lines changed

.kitchen.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@ verifier:
5555
ruby_bindir: '/usr/bin'
5656

5757
suites:
58-
- name: default
58+
- name: standard
59+
provisioner:
60+
playbook: test/integration/standard.yml
5961
run_list:
6062
attributes:
63+
- name: package
64+
run_list:
65+
attributes:
66+
provisioner:
67+
playbook: test/integration/package.yml
68+

test/integration/package.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
- name: Elasticsearch Package tests
3+
hosts: localhost
4+
roles:
5+
- elasticsearch
6+
vars:
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
require 'spec_helper'
2+
3+
context "basic tests" do
4+
5+
describe user('elasticsearch') do
6+
it { should exist }
7+
end
8+
9+
describe service('elasticsearch') do
10+
it { should be_running }
11+
end
12+
13+
describe package('elasticsearch') do
14+
it { should be_installed }
15+
end
16+
17+
describe file('/etc/elasticsearch/elasticsearch.yml') do
18+
it { should be_file }
19+
end
20+
21+
end
22+

test/integration/default.yml renamed to test/integration/standard.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
roles:
55
- elasticsearch
66
vars:
7+
es_use_repository: "true"
78
es_plugins:
89
- plugin: lmenezes/elasticsearch-kopf
910
version: master
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
require 'serverspec'
2+
set :backend, :exec
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
- host: test-kitchen

0 commit comments

Comments
 (0)