forked from evolvingweb/puppet-apt
-
Notifications
You must be signed in to change notification settings - Fork 465
/
Copy pathinit_task_spec.rb
34 lines (29 loc) · 1.04 KB
/
init_task_spec.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# frozen_string_literal: true
# run a test task
require 'spec_helper_acceptance'
describe 'apt tasks' do
describe 'update' do
it 'updates package lists' do
result = run_bolt_task('apt', 'action' => 'update')
expect(result.stdout).to contain(%r{Reading package lists})
end
end
describe 'upgrade' do
it 'upgrades packages' do
result = run_bolt_task('apt', 'action' => 'upgrade')
expect(result.stdout).to contain(%r{\d+ upgraded, \d+ newly installed, \d+ to remove and \d+ not upgraded})
end
end
describe 'dist-upgrade' do
it 'dist-upgrades packages' do
result = run_bolt_task('apt', 'action' => 'dist-upgrade')
expect(result.stdout).to contain(%r{\d+ upgraded, \d+ newly installed, \d+ to remove and \d+ not upgraded})
end
end
describe 'autoremove' do
it 'autoremoves obsolete packages' do
result = run_bolt_task('apt', 'action' => 'autoremove')
expect(result.stdout).to contain(%r{\d+ upgraded, \d+ newly installed, \d+ to remove and \d+ not upgraded})
end
end
end