File tree Expand file tree Collapse file tree 10 files changed +70
-23
lines changed
Expand file tree Collapse file tree 10 files changed +70
-23
lines changed Original file line number Diff line number Diff line change 11fixtures :
2- repositories :
3- stdlib :
4- repo : " https://github.com/puppetlabs/puppetlabs-stdlib "
5- ref : " 3.2.0 "
6- apt : https://github.com/puppetlabs/puppetlabs-apt.git
7- zypprepo : https://github.com/deadpoint/puppet-zypprepo.git
8- symlinks :
9- logstash : " #{source_dir}"
2+ forge_modules :
3+ apt : puppetlabs/apt
4+ elastic_stack : elastic/elastic_stack
5+ stdlib : puppetlabs/stdlib
6+ zypprepo : darin/zypprepo
7+
8+ symlinks :
9+ logstash : #{source_dir}
Original file line number Diff line number Diff line change 1616
1717script :
1818 - docker run --privileged -d polarbearlabs/haveged:1.9.1 # https://github.com/elastic/logstash/issues/5507
19- - (if [[ -n $TRAVIS_LINT ]]; then make lint; else bundle exec rake beaker; fi)
19+ - |
20+ (
21+ if [[ -n $TRAVIS_LINT ]]; then
22+ make lint
23+ elif [[ -n $TRAVIS_UNIT ]]; then
24+ bundle exec rake spec
25+ else
26+ bundle exec rake beaker
27+ fi
28+ )
2029
2130env :
2231 global :
2332 - LOGSTASH_VERSION=6.0.0
2433 - BEAKER_PE_DIR=spec/fixtures/artifacts
34+ - CI_SPEC_OPTIONS='--format documentation'
2535 matrix :
2636 # Do linting once.
2737 - TRAVIS_LINT=true
2838
39+ # Run the puppet-rspec synthetic/unit tests.
40+ - PUPPET_VERSION=4.6.1 TRAVIS_UNIT=true
41+ - PUPPET_VERSION=4.8.2 TRAVIS_UNIT=true
42+ - PUPPET_VERSION=4.9.4 TRAVIS_UNIT=true
43+ - PUPPET_VERSION=4.10.8 TRAVIS_UNIT=true
44+ - PUPPET_VERSION=5.0.1 TRAVIS_UNIT=true
45+ - PUPPET_VERSION=5.1.0 TRAVIS_UNIT=true
46+ - PUPPET_VERSION=5.2.0 TRAVIS_UNIT=true
47+ - PUPPET_VERSION=5.3.3 TRAVIS_UNIT=true
48+
2949 # Then run the acceptance tests across the matrix.
3050 - PUPPET_VERSION=4.6.1 BEAKER_set=centos-6
3151 - PUPPET_VERSION=4.8.2 BEAKER_set=centos-6
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ gem 'puppetlabs_spec_helper'
2929gem 'puppet-syntax'
3030gem 'rspec-puppet-facts'
3131gem 'rubocop'
32+ gem 'semantic_puppet'
3233gem 'serverspec' , '2.38.0'
3334gem 'specinfra' , '2.67.3'
3435gem 'syck'
Original file line number Diff line number Diff line change 4646 require logstash::package
4747 $exe = " ${logstash::home_dir} /bin/logstash-plugin"
4848
49+ Exec {
50+ path => ' /bin:/usr/bin' ,
51+ user => $logstash::logstash_user ,
52+ timeout => 1800,
53+ environment => $environment ,
54+ }
55+
4956 case $source { # Where should we get the plugin from?
5057 undef: {
5158 # No explict source, so search Rubygems for the plugin, by name.
116123 fail " 'ensure' should be 'present', 'absent', or a version like '1.3.4'."
117124 }
118125 }
119-
120- Exec {
121- path => ' /bin:/usr/bin' ,
122- user => $logstash::logstash_user ,
123- timeout => 1800,
124- environment => $environment ,
125- }
126126}
Original file line number Diff line number Diff line change 11{
22 "name" : " elastic-logstash" ,
3- "version" : " 6.0.1 " ,
3+ "version" : " 6.0.2 " ,
44 "source" : " https://github.com/elastic/puppet-logstash" ,
55 "author" : " elastic" ,
66 "license" : " Apache-2.0" ,
Original file line number Diff line number Diff line change 1+ require 'spec_helper'
2+
3+ describe 'logstash::plugin' do
4+ on_supported_os . each do |os , facts |
5+ context "on #{ os } " do
6+ let ( :facts ) do
7+ facts
8+ end
9+
10+ let ( :pre_condition ) { %q(
11+ include elastic_stack::repo
12+ include logstash
13+ ) }
14+
15+ let ( :title ) { 'logstash-input-mysql' }
16+
17+ it { is_expected . to compile }
18+
19+ it {
20+ is_expected . to contain_exec ( "install-#{ title } " ) . with ( user : 'logstash' )
21+ }
22+ end
23+ end
24+ end
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- require 'rubygems'
21require 'puppetlabs_spec_helper/module_spec_helper'
2+ require 'rspec-puppet-facts'
3+ include RspecPuppetFacts
4+
5+ default_facts = {
6+ puppetversion : Puppet . version ,
7+ facterversion : Facter . version ,
8+ }
39
410RSpec . configure do |c |
5- Puppet . settings [ :strict_variables ] = true if ENV [ 'STRICT_VARIABLES' ] == 'true'
6- Puppet . settings [ :ordering ] = 'random' if ENV [ 'ORDERING_RANDOM' ] == 'true'
7- c . parser = 'future' if ENV [ 'FUTURE_PARSER' ] == 'true'
11+ c . default_facts = default_facts
812end
You can’t perform that action at this time.
0 commit comments