Merge pull request #34 from Martin819/master
Added Kitchen tests and Travis
diff --git a/.kitchen.yml b/.kitchen.yml
new file mode 100644
index 0000000..48d3a50
--- /dev/null
+++ b/.kitchen.yml
@@ -0,0 +1,43 @@
+---
+driver:
+ name: docker
+ hostname: rabbitmq.ci.local
+ use_sudo: false
+
+provisioner:
+ name: salt_solo
+ salt_install: bootstrap
+ salt_bootstrap_url: https://bootstrap.saltstack.com
+ salt_version: latest
+ require_chef: false
+ log_level: error
+ formula: rabbitmq
+ grains:
+ noservices: True
+ state_top:
+ base:
+ "*":
+ - rabbitmq
+ pillars:
+ top.sls:
+ base:
+ "*":
+ - rabbitmq
+
+verifier:
+ name: inspec
+ sudo: true
+
+platforms:
+ - name: <%=ENV['PLATFORM'] || 'ubuntu-xenial'%>
+ driver_config:
+ image: <%=ENV['PLATFORM'] || 'trevorj/salty-whales:xenial'%>
+ platform: ubuntu
+
+suites:
+
+ - name: rabbitmq_server
+ provisioner:
+ pillars-from-files:
+ rabbitmq.sls: tests/pillar/rabbitmq_server.sls
+# vim: ft=yaml sw=2 ts=2 sts=2 tw=125
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..4c8e84e
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,29 @@
+sudo: required
+services:
+ - docker
+
+install:
+ - pip install PyYAML
+ - pip install virtualenv
+ - |
+ test -e Gemfile || cat <<EOF > Gemfile
+ source 'https://rubygems.org'
+ gem 'rake'
+ gem 'test-kitchen'
+ gem 'kitchen-docker'
+ gem 'kitchen-inspec'
+ gem 'inspec'
+ gem 'kitchen-salt', :git => 'https://github.com/epcim/kitchen-salt.git', :branch => 'dependencis-pkg-repo2'
+ #Waiting for PR#78
+ #gem 'kitchen-salt', '>=0.2.25'
+ - bundle install
+
+env:
+ - PLATFORM=trevorj/salty-whales:trusty
+ - PLATFORM=trevorj/salty-whales:xenial
+
+before_script:
+ - make test | tail
+
+script:
+ - test ! -e .kitchen.yml || bundle exec kitchen test -t tests/integration
diff --git a/metadata.yml b/metadata.yml
index af10fa9..0ac0c26 100644
--- a/metadata.yml
+++ b/metadata.yml
@@ -1,3 +1,3 @@
name: "rabbitmq"
version: "0.2"
-source: "https://github.com/tcpcloud/salt-formula-rabbitmq"
+source: "https://github.com/salt-formulas/salt-formula-rabbitmq"
diff --git a/tests/pillar/rabbitmq_server.sls b/tests/pillar/rabbitmq_server.sls
index 410af92..577a576 100644
--- a/tests/pillar/rabbitmq_server.sls
+++ b/tests/pillar/rabbitmq_server.sls
@@ -17,4 +17,7 @@
- name: HA
pattern: '^(?!amq\.).*'
definition: '{"ha-mode": "all"}'
+ memory:
+ vm_high_watermark: 0.4
+ plugins: ['']