Skip to content

Commit

Permalink
Merge pull request #22 from nexecook/default_action
Browse files Browse the repository at this point in the history
explictly use the change action for udevadm trigger
  • Loading branch information
jhoblitt authored Feb 2, 2017
2 parents 4abfdeb + 5f7b5ab commit c1cc3ae
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 9 deletions.
4 changes: 0 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ sudo: false
language: ruby
bundler_args: --without beaker
rvm:
- 1.8.7
- 1.9.3
- 2.0
- 2.1
- 2.2
Expand All @@ -12,8 +10,6 @@ env:
- PUPPET_GEM_VERSION="~> 4.0"
matrix:
exclude:
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 4.0"
- rvm: 2.2
env: PUPPET_GEM_VERSION="~> 3.7"
fast_finish: true
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ end

group :beaker do
gem 'serverspec', :require => false
gem 'beaker', :require => false
gem 'beaker', '<= 2.26.0', :require => false
gem 'beaker-rspec', :require => false
gem 'pry', :require => false
gem 'travis-lint', :require => false
Expand Down
6 changes: 3 additions & 3 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
'debian': {
$udev_package = 'udev'
$udevlogpriority = 'udevadm control --log-priority'
$udevtrigger = 'udevadm trigger'
$udevtrigger = 'udevadm trigger --action=change'
}
'redhat': {
if $::operatingsystem == 'Fedora' {
Expand All @@ -30,12 +30,12 @@
}
'6': {
$udev_package = 'udev'
$udevtrigger = 'udevadm trigger'
$udevtrigger = 'udevadm trigger --action=change'
$udevlogpriority = 'udevadm control --log-priority'
}
'7': {
$udev_package = 'systemd'
$udevtrigger = 'udevadm trigger'
$udevtrigger = 'udevadm trigger --action=change'
$udevlogpriority = 'udevadm control --log-priority'
}
default: {
Expand Down
2 changes: 2 additions & 0 deletions spec/classes/params_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
{
:osfamily => 'RedHat',
:operatingsystemmajrelease => '6',
:operatingsystem => 'RedHat',
}
end

Expand All @@ -18,6 +19,7 @@
{
:osfamily => 'RedHat',
:operatingsystemmajrelease => '4',
:operatingsystem => 'RedHat',
}
end

Expand Down
1 change: 1 addition & 0 deletions spec/classes/udev_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
{
:osfamily => 'RedHat',
:operatingsystemmajrelease => '6',
:operatingsystem => 'RedHat',
}
end

Expand Down
2 changes: 2 additions & 0 deletions spec/classes/udevadm/logpriority_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
let(:facts) do
{ :osfamily => 'RedHat',
:operatingsystemmajrelease => '6',
:operatingsystem => 'RedHat',
}
end

Expand Down Expand Up @@ -67,6 +68,7 @@
let(:facts) do
{ :osfamily => 'RedHat',
:operatingsystemmajrelease => '5',
:operatingsystem => 'RedHat',
}
end

Expand Down
4 changes: 3 additions & 1 deletion spec/classes/udevadm/trigger_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
let(:facts) do
{ :osfamily => 'RedHat',
:operatingsystemmajrelease => '6',
:operatingsystem => 'RedHat',
}
end

it { should contain_class('udev::udevadm::trigger') }
it do
should contain_exec('udevadm trigger').with({
should contain_exec('udevadm trigger --action=change').with({
:refreshonly => true,
:path => ['/sbin'],
})
Expand All @@ -22,6 +23,7 @@
let(:facts) do
{ :osfamily => 'RedHat',
:operatingsystemmajrelease => '5',
:operatingsystem => 'RedHat',
}
end

Expand Down
1 change: 1 addition & 0 deletions spec/defines/rule_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
{
:osfamily => 'RedHat',
:operatingsystemmajrelease => '6',
:operatingsystem => 'RedHat',
}
end

Expand Down

0 comments on commit c1cc3ae

Please sign in to comment.