Skip to content

Commit

Permalink
Sets apt hold on firefox in dev and staging environments
Browse files Browse the repository at this point in the history
Changes in #1445 forced installation of a specific version of Firefox,
which caused tests to fail since not all packages were updated.
Carefully modified the tests to permit either "0" or "1" packages not
upgraded.
  • Loading branch information
Conor Schaefer committed Nov 6, 2016
1 parent b446f88 commit c00a120
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@
tags:
- apt

- name: Set apt hold on Firefox version.
command: apt-mark hold firefox
register: apt_hold_firefox_result
# apt-mark will return output to report changed status; subsequent runs
# will report "firefox was already set on hold."
changed_when: "'firefox set on hold' in apt_hold_firefox_result.stdout"

- name: Copy xvfb init script.
copy:
src: xvfb
Expand Down
4 changes: 3 additions & 1 deletion spec_tests/spec/common/cron_apt_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@
describe command('aptitude --simulate -y safe-upgrade') do
its(:exit_status) { should eq 0 }
its(:stdout) { should match /^No packages will be installed, upgraded, or removed\.$/ }
its(:stdout) { should match /0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded\./ }
# Temporarily allowing "1 not upgraded" since we're pinning a version of firefox
# known to work well with our version of selenium; see #1445.
its(:stdout) { should match /^0 packages upgraded, 0 newly installed, 0 to remove and [01] not upgraded\.$/ }
end

# TODO: In order to validate the intended system state post-provisioning,
Expand Down
4 changes: 3 additions & 1 deletion spec_tests/spec/grsecurity/grsec_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@

# ensure old packages have been autoremoved
describe command('apt-get --dry-run autoremove') do
its(:stdout) { should match /^0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded\.$/ }
# Temporarily allowing "1 not upgraded" since we're pinning a version of firefox
# known to work well with our version of selenium; see #1445.
its(:stdout) { should match /^0 upgraded, 0 newly installed, 0 to remove and [01] not upgraded\.$/ }
its(:exit_status) { should eq 0 }
end

Expand Down

0 comments on commit c00a120

Please sign in to comment.