File tree Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -5,10 +5,11 @@ group :test do
55 gem "puppet" , ENV [ 'PUPPET_VERSION' ] || '~> 3.6.0'
66 gem 'metadata-json-lint'
77 gem "puppet-lint"
8- gem "rspec-puppet" , :git => 'https://github.com/rodjek/rspec-puppet.git'
8+ gem "rspec-puppet"
99 gem "puppet-syntax"
1010 gem "puppetlabs_spec_helper"
1111 gem "toml"
12+ gem 'json_pure' , '<= 1.8.3' , :require => false if RUBY_VERSION . to_f <= 1.9
1213end
1314
1415group :development do
Original file line number Diff line number Diff line change 1818 default => $real_archive_source ,
1919 }
2020 }
21-
21+
2222 case $::grafana::install_method {
2323 ' docker' : {
2424 docker::image { 'grafana/grafana' :
107107 }
108108 }
109109
110+ if ($::grafana::version == ' installed' or $::grafana::version == ' latest' or $::grafana::version == ' present' ) {
111+ $package_ensure = $::grafana::version
112+ } else {
113+ $package_ensure = " ${::grafana::version} -${::grafana::rpm_iteration} "
114+ }
110115 package { $::grafana::package_name :
111- ensure => " ${::grafana::version} - ${::grafana::rpm_iteration} " ,
116+ ensure => $package_ensure ,
112117 require => Package[' fontconfig' ]
113118 }
114119 }
Original file line number Diff line number Diff line change 139139 it { should contain_package ( 'grafana' ) . with_ensure ( 'present' ) }
140140 end
141141 end
142+
143+ context 'redhat' do
144+ let ( :facts ) { {
145+ :osfamily => 'RedHat' ,
146+ } }
147+
148+ it { should compile . with_all_deps }
149+ describe 'install the package' do
150+ it { should contain_package ( 'grafana' ) . with_ensure ( 'present' ) }
151+ end
152+ end
142153 end
143154
144155 context 'archive install method' do
You can’t perform that action at this time.
0 commit comments