Skip to content

Commit

Permalink
Issue 1: Add acceptance tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcus Young committed Oct 15, 2014
1 parent a30e752 commit d7c8bc4
Show file tree
Hide file tree
Showing 17 changed files with 387 additions and 85 deletions.
11 changes: 4 additions & 7 deletions .fixtures.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
fixtures:
repositories:
java:
git://github.com/puppetlabs/puppetlabs-java.git
firewall:
git://github.com/puppetlabs/puppetlabs-firewall.git
stdlib:
git://github.com/puppetlabs/puppetlabs-stdlib.git
forge_modules:
firewall: "puppetlabs/firewall"
java: "puppetlabs/java"
stdlib: "puppetlabs/stdlib"
symlinks:
mirthconnect: "#{source_dir}"
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
/pkg
/.vagrant
/log
/coverage
/spec/fixtures
42 changes: 28 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,40 @@
---
branches:
only:
- master
- dev
language: ruby
before_install: 'bundle install'
bundler_args: --without development
script: 'bundle exec rake' #rspec and lint tests
gemfile: .travis/Gemfile
rvm:
- 1.9.3
- 2.0.0
gemfile: .travis/Gemfile
- 2.1.1
env:
matrix:
- PUPPET_GEM_VERSION="~> 2.7.0"
- PUPPET_GEM_VERSION="~> 3.0"
- PUPPET_GEM_VERSION="~> 3.0.0"
- PUPPET_GEM_VERSION="~> 3.1.0"
- PUPPET_GEM_VERSION="~> 3.2.0"
- PUPPET_GEM_VERSION="~> 3.3.0"
- PUPPET_GEM_VERSION="~> 3.4.0"
matrix:
exclude:
- rvm: 1.9.3
env: PUPPET_GEM_VERSION="~> 2.7.0"
gemfile: .travis/Gemfile
- rvm: 2.0.0
env: PUPPET_GEM_VERSION="~> 2.7.0"
gemfile: .travis/Gemfile
notifications:
- rvm: 1.9.3
env: PUPPET_GEM_VERSION="~> 2.7.0"
- rvm: 1.9.3
env: PUPPET_GEM_VERSION="~> 3.0.0"
- rvm: 2.0.0
env: PUPPET_GEM_VERSION="~> 3.1.0"
- rvm: 2.0.0
env: PUPPET_GEM_VERSION="~> 3.0.0"
- rvm: 2.0.0
env: PUPPET_GEM_VERSION="~> 2.7.0"
- rvm: 2.1.1
env: PUPPET_GEM_VERSION="~> 2.7.0"
- rvm: 2.1.1
env: PUPPET_GEM_VERSION="~> 3.0.0"
- rvm: 2.1.1
env: PUPPET_GEM_VERSION="~> 3.1.0"
- rvm: 2.1.1
env: PUPPET_GEM_VERSION="~> 3.2.0"
- rvm: 2.1.1
env: PUPPET_GEM_VERSION="~> 3.3.0"
email: false
20 changes: 20 additions & 0 deletions .travis/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
source 'http://rubygems.org'

group :development do
gem 'rake', '>=0.9.2.2'
end

group :rake do
gem 'beaker-rspec'
gem 'coveralls', require: false
gem 'puppet-blacksmith'
gem 'puppet-lint', '>=0.1.12'
gem 'puppetlabs_spec_helper'
gem 'rspec-puppet', '>=0.1.3'
end

if puppetversion = ENV['PUPPET_GEM_VERSION']
gem 'puppet', puppetversion, :require => false
else
gem 'puppet', :require => false
end
14 changes: 11 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
source 'http://rubygems.org'

group :development do
gem 'rake', '>=0.9.2.2'
gem 'beaker-rspec', :require => false
end

group :rake do
gem 'coveralls', require: false
gem 'puppet', '>=3.0.1'
gem 'puppet-blacksmith'
gem 'puppet-lint', '>=0.1.12'
gem 'puppetlabs_spec_helper'
gem 'rake', '>=0.9.2.2'
gem 'rspec-puppet', '>=0.1.3'
gem 'yarjuf'
end

if puppetversion = ENV['PUPPET_GEM_VERSION']
gem 'puppet', puppetversion, :require => false
else
gem 'puppet', :require => false
end
198 changes: 166 additions & 32 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,58 +1,192 @@
GEM
remote: http://rubygems.org/
specs:
CFPropertyList (2.2.8)
addressable (2.3.6)
archive-tar-minitar (0.5.2)
autoparse (0.3.3)
addressable (>= 2.3.1)
extlib (>= 0.9.15)
multi_json (>= 1.0.0)
aws-sdk (1.42.0)
json (~> 1.4)
nokogiri (>= 1.4.4)
beaker (1.19.1)
aws-sdk (= 1.42.0)
blimpy (~> 0.6)
docker-api
fission (~> 0.4)
fog (~> 1.22.1)
google-api-client (~> 0.7.1)
hocon (~> 0.0.4)
inifile (~> 2.0)
json (~> 1.8)
mime-types (~> 1.25)
net-scp (~> 1.1)
net-ssh (~> 2.6)
nokogiri (~> 1.5.10)
rbvmomi (= 1.8.1)
unf (~> 0.1)
beaker-rspec (3.0.0)
beaker (~> 1.10)
rspec
serverspec (~> 1.0)
specinfra (~> 1.0)
blimpy (0.6.7)
fog
minitar
thor
builder (3.2.2)
coveralls (0.7.1)
multi_json (~> 1.3)
rest-client
simplecov (>= 0.7)
term-ansicolor
thor
diff-lcs (1.2.5)
facter (1.7.3)
hiera (1.3.0)
docile (1.1.5)
docker-api (1.13.6)
archive-tar-minitar
excon (>= 0.38.0)
json
excon (0.40.0)
extlib (0.9.16)
facter (2.2.0)
CFPropertyList (~> 2.2.6)
faraday (0.9.0)
multipart-post (>= 1.2, < 3)
fission (0.5.0)
CFPropertyList (~> 2.2)
fog (1.22.1)
fog-brightbox
fog-core (~> 1.22)
fog-json
ipaddress (~> 0.5)
nokogiri (~> 1.5, >= 1.5.11)
fog-brightbox (0.5.1)
fog-core (~> 1.22)
fog-json
inflecto
fog-core (1.24.0)
builder
excon (~> 0.38)
formatador (~> 0.2)
mime-types
net-scp (~> 1.1)
net-ssh (>= 2.1.3)
fog-json (1.0.0)
multi_json (~> 1.0)
formatador (0.2.5)
google-api-client (0.7.1)
addressable (>= 2.3.2)
autoparse (>= 0.3.3)
extlib (>= 0.9.15)
faraday (>= 0.9.0)
jwt (>= 0.1.5)
launchy (>= 2.1.1)
multi_json (>= 1.0.0)
retriable (>= 1.4)
signet (>= 0.5.0)
uuidtools (>= 2.1.0)
hiera (1.3.4)
json_pure
highline (1.6.21)
hocon (0.0.6)
inflecto (0.0.2)
inifile (2.0.2)
ipaddress (0.8.0)
json (1.8.1)
json_pure (1.8.1)
metaclass (0.0.1)
jwt (1.0.0)
launchy (2.4.2)
addressable (~> 2.3)
metaclass (0.0.4)
mime-types (1.25.1)
mocha (0.14.0)
minitar (0.5.4)
mocha (1.1.0)
metaclass (~> 0.0.1)
multi_json (1.10.1)
multipart-post (2.0.0)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (2.9.1)
netrc (0.7.7)
nokogiri (1.5.11)
puppet (3.3.2)
facter (~> 1.6)
puppet (3.7.1)
facter (> 1.6, < 3)
hiera (~> 1.0)
rgen (~> 0.6.5)
puppet-blacksmith (2.0.2)
nokogiri
json_pure
puppet-blacksmith (3.0.2)
puppet (>= 2.7.16)
rest-client
puppet-lint (0.3.2)
puppetlabs_spec_helper (0.4.1)
mocha (>= 0.10.5)
puppet-lint (1.1.0)
puppet-syntax (1.3.0)
rake
puppetlabs_spec_helper (0.8.2)
mocha
puppet-lint
puppet-syntax
rake
rspec (>= 2.9.0)
rspec-puppet (>= 0.1.1)
rake (10.1.0)
rest-client (1.6.7)
mime-types (>= 1.16)
rgen (0.6.6)
rspec (2.14.1)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
rspec-core (2.14.7)
rspec-expectations (2.14.4)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.14.4)
rspec-puppet (0.1.6)
rspec
yarjuf (1.0.5)
rspec-puppet
rake (10.3.2)
rbvmomi (1.8.1)
builder
rspec (>= 2.0)
nokogiri (>= 1.4.1)
trollop
rest-client (1.7.2)
mime-types (>= 1.16, < 3.0)
netrc (~> 0.7)
retriable (1.4.1)
rspec (2.99.0)
rspec-core (~> 2.99.0)
rspec-expectations (~> 2.99.0)
rspec-mocks (~> 2.99.0)
rspec-core (2.99.2)
rspec-expectations (2.99.2)
diff-lcs (>= 1.1.3, < 2.0)
rspec-its (1.0.1)
rspec-core (>= 2.99.0.beta1)
rspec-expectations (>= 2.99.0.beta1)
rspec-mocks (2.99.2)
rspec-puppet (1.0.1)
rspec
serverspec (1.16.0)
highline
net-ssh
rspec (~> 2.99)
rspec-its
specinfra (~> 1.27)
signet (0.5.1)
addressable (>= 2.2.3)
faraday (>= 0.9.0.rc5)
jwt (>= 0.1.5)
multi_json (>= 1.0.0)
simplecov (0.9.1)
docile (~> 1.1.0)
multi_json (~> 1.0)
simplecov-html (~> 0.8.0)
simplecov-html (0.8.0)
specinfra (1.27.5)
term-ansicolor (1.3.0)
tins (~> 1.0)
thor (0.19.1)
tins (1.3.3)
trollop (2.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.6)
uuidtools (2.1.5)

PLATFORMS
ruby
x86-mingw32

DEPENDENCIES
puppet (>= 3.0.1)
beaker-rspec
coveralls
puppet
puppet-blacksmith
puppet-lint (>= 0.1.12)
puppetlabs_spec_helper
rake (>= 0.9.2.2)
rspec-puppet (>= 0.1.3)
yarjuf
12 changes: 0 additions & 12 deletions Modulefile

This file was deleted.

17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,28 @@ Quick Start
2. Via RPM (default)

class { 'mirthconnect::mirthconnect':
provider => 'rpm' # RPM is the default.
source => 'www.foo.com/mirth-1.2.1.rpm' # change the source RPM
provider => 'rpm' # RPM is the default.
rpm_source => 'www.foo.com/mirth-1.2.1.rpm' # change the source RPM
admin_password => 'foo',
}

Hiera
=====

mirthconnect::admin_password: 'admin'
mirthconnect::source: 'www.foo.com/mirth.rpm'
mirthconnect::rpm_source: 'www.foo.com/mirth.rpm'
mirthconnect::provider: 'rpm'

Testing
=====

TBD
* Run the default tests (puppet + lint)

bundle install
bundle exec rake

* Run the [beaker](https://github.com/puppetlabs/beaker) acceptance tests

Due to licensing issues, I cannot distribute the MirthConnect RPM.

$ for i in `ls spec/acceptance/*_spec.rb`; do echo $i; MIRTH_YUM_URL=http://my.foo.com/yum/ bundle exec rspec $i | grep -A 150 Destroying\ vagrant\ boxes; done
Loading

0 comments on commit d7c8bc4

Please sign in to comment.