tests/main: use pkgdb function in more test cases #3455

Merged
merged 13 commits into from Jun 19, 2017

Conversation

Projects
None yet
6 participants
Contributor

morphis commented Jun 9, 2017

No description provided.

zyga approved these changes Jun 9, 2017

+1 but two questions asked.

@@ -29,8 +31,7 @@ execute: |
. "$TESTSLIB/pkgdb.sh"
echo "Ensure core is gone and we have ubuntu-core instead"
- dpkg --purge --force-depends snapd
- apt-get install -f -y
@zyga

zyga Jun 9, 2017

Contributor

Hmm, I wonder what this thing is about, why did we apt-get install ... nothing here?

@morphis

morphis Jun 9, 2017

Contributor

apt-get install -f -y actually does dependency cleanup if you did a purge via dpkg --purge

echo "Given openvswitch is installed"
- apt install -y --no-install-recommends openvswitch-switch
@zyga

zyga Jun 9, 2017

Contributor

Is the --no-install-recommends relevant? I wonder why it was here.

@morphis

morphis Jun 9, 2017

Contributor

Good catch, I actually added to support for that to the distro_install_package command but looks like this was dropped during the rebase/master I did

@morphis

morphis Jun 9, 2017

Contributor

Fixed that. distro_install_package now accepts --no-install-recommends as argument.

@Conan-Kudo

Conan-Kudo Jun 9, 2017

Contributor

It might be better to be more generic: --no-weak-deps, which for Debian could be --no-install-recommends. For openSUSE, it would be --no-recommends, and for Fedora, it'd be --setopt=install_weak_deps=False

@morphis

morphis Jun 12, 2017

Contributor

Let me add these thanks.

@morphis

morphis Jun 12, 2017

Contributor

Done.

Simon Fels added some commits Jun 9, 2017

tests/lib/pkgdb.sh
;;
fedora-*)
- dnf -q -y install -y "$DNF_FLAGS" $package_name
+ dnf -q -y install "$DNF_FLAGS" -y $package_name
@Conan-Kudo

Conan-Kudo Jun 12, 2017

Contributor

Why are you doing -y twice? It's already being used as a global flag...

@morphis

morphis Jun 12, 2017

Contributor

You're faster than me, already about to push another change to fix that.

tests/lib/pkgdb.sh
;;
opensuse-*)
- zypper -q install -y "$ZYPPER_FLAGS" $package_name
+ zypper -q install "$ZYPPER_FLAGS" $package_name
@Conan-Kudo

Conan-Kudo Jun 12, 2017

Contributor

You still need -y after install subcommand for Zypper.

@morphis

morphis Jun 12, 2017

Contributor

Narf. Never do multiple things at the same time :-)

codecov-io commented Jun 12, 2017

Codecov Report

Merging #3455 into master will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3455      +/-   ##
==========================================
+ Coverage   77.15%   77.18%   +0.02%     
==========================================
  Files         373      375       +2     
  Lines       25793    25837      +44     
==========================================
+ Hits        19901    19941      +40     
- Misses       4134     4136       +2     
- Partials     1758     1760       +2
Impacted Files Coverage Δ
dirs/dirs.go 96.77% <0%> (-0.06%) ⬇️
daemon/api.go 73.18% <0%> (-0.01%) ⬇️
interfaces/builtin/content.go 80.73% <0%> (ø) ⬆️
cmd/snap/cmd_run.go 64.51% <0%> (ø) ⬆️
interfaces/policy/basedeclaration.go 40.74% <0%> (ø) ⬆️
interfaces/builtin/udisks2.go 82.5% <0%> (ø) ⬆️
cmd/snap/cmd_get_base_declaration.go 75% <0%> (ø)
interfaces/builtin/greengrass_support.go 100% <0%> (ø)
overlord/snapstate/snapstate.go 81.52% <0%> (+0.23%) ⬆️
asserts/repair.go 95.55% <0%> (+1.61%) ⬆️

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 8064fa0...0a690c7. Read the comment docs.

LGTM

Contributor

fgimenez commented Jun 13, 2017

There's an issue with the management of --no-install-recommends https://travis-ci.org/snapcore/snapd/builds/242007338#L1944

Contributor

morphis commented Jun 13, 2017

@fgimenez Thanks, yeah I saw that already. Has something to do with the quoting of APT_FLAGS, not yet sure what it is.

Simon Fels added some commits Jun 13, 2017

@mvo5 mvo5 merged commit 70180a0 into snapcore:master Jun 19, 2017

6 of 7 checks passed

xenial-i386 autopkgtest finished (failure)
Details
artful-amd64 autopkgtest finished (success)
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
xenial-amd64 autopkgtest finished (success)
Details
xenial-ppc64el autopkgtest finished (success)
Details
yakkety-amd64 autopkgtest finished (success)
Details
zesty-amd64 autopkgtest finished (success)
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment