tests: use dnf --refresh install to avert stale cache #3721

Merged
merged 1 commit into from Aug 11, 2017

Conversation

Projects
None yet
3 participants
Contributor

zyga commented Aug 11, 2017

While our package abstraction helper for spread tests does call dnf
makecache evidence in test failures shows that something is not quite
right and we fail to install packages that have since, in the archive,
been upgraded to a new revision and we attempt to install the old
version oblivious to that fact.

Neal Gompa suggested that we use the --refresh option on dnf install to
always ensure that the package cache is updated if it is out of date.

Signed-off-by: Zygmunt Krynicki zygmunt.krynicki@canonical.com

tests: use dnf --refresh install to avert stale cache
While our package abstraction helper for spread tests does call dnf
makecache evidence in test failures shows that something is not quite
right and we fail to install packages that have since, in the archive,
been upgraded to a new revision and we attempt to install the old
version oblivious to that fact.

Neal Gompa suggested that we use the --refresh option on dnf install to
always ensure that the package cache is updated if it is out of date.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

mvo5 approved these changes Aug 11, 2017

\o/ if it helps …

Codecov Report

Merging #3721 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3721      +/-   ##
==========================================
- Coverage   75.65%   75.65%   -0.01%     
==========================================
  Files         391      391              
  Lines       33849    33849              
==========================================
- Hits        25609    25608       -1     
- Misses       6418     6419       +1     
  Partials     1822     1822
Impacted Files Coverage Δ
cmd/snap/cmd_aliases.go 93.33% <0%> (-1.67%) ⬇️
overlord/snapstate/snapstate.go 80.45% <0%> (-0.27%) ⬇️
wrappers/binaries.go 79.31% <0%> (+10.34%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c7879ad...c3673df. Read the comment docs.

@zyga zyga merged commit 506d333 into snapcore:master Aug 11, 2017

1 of 7 checks passed

artful-amd64 autopkgtest running
Details
xenial-amd64 autopkgtest running
Details
xenial-i386 autopkgtest running
Details
xenial-ppc64el autopkgtest running
Details
yakkety-amd64 autopkgtest running
Details
zesty-amd64 autopkgtest running
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@zyga zyga deleted the zyga:fix/dnf-install-refresh branch Aug 11, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment