Skip to content

Commit

Permalink
Support LS 7 in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ninaspitfire committed Aug 29, 2019
1 parent 934e091 commit 1955470
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,3 @@ env:
- PUPPET_VERSION=5.5.16 BEAKER_set=ubuntu-1604 LOGSTASH_VERSION=6.8.2
- PUPPET_VERSION=6.0.10 BEAKER_set=ubuntu-1604
- PUPPET_VERSION=6.0.10 BEAKER_set=ubuntu-1604 LOGSTASH_VERSION=6.8.2

4 changes: 2 additions & 2 deletions manifests/plugin.pp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

Exec {
path => '/bin:/usr/bin',
cwd => '/tmp',
cwd => $logstash::home_dir,
user => $logstash::logstash_user,
timeout => 1800,
environment => $environment,
Expand Down Expand Up @@ -116,7 +116,7 @@
'absent': {
exec { "remove-${name}":
command => "${exe} remove ${name}",
onlyif => "${exe} list | grep -q ^${name}$",
onlyif => "${exe} list --installed | grep -q ^${name}$",
}
}

Expand Down
11 changes: 6 additions & 5 deletions spec/acceptance/class_plugin_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,19 @@ def remove(plugin)
end

context 'when a plugin is not installed' do
plugin = "logstash-output-riemann"
before(:each) do
remove('logstash-input-sqs')
remove(plugin)
end

it 'will not remove it again' do
log = ensure_plugin('absent', 'logstash-input-sqs').stdout
expect(log).to_not contain('remove-logstash-input-sqs')
log = ensure_plugin('absent', plugin).stdout
expect(log).to_not contain("remove-#{plugin}")
end

it 'can install it from rubygems' do
ensure_plugin('present', 'logstash-input-sqs')
expect(installed_plugins).to contain('logstash-input-sqs')
ensure_plugin('present', plugin)
expect(installed_plugins).to contain(plugin)
end
end

Expand Down
1 change: 0 additions & 1 deletion spec/acceptance/nodesets/ubuntu-1604.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ HOSTS:
CONFIG:
type: foss
:trace_limit: 100 # Get more than 10 lines of trace when something fails.
it st

0 comments on commit 1955470

Please sign in to comment.