New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests/main: use pkgdb function in more test cases #3455
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I wonder what this thing is about, why did we apt-get install
... nothing here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the --no-install-recommends
relevant? I wonder why it was here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed that. distro_install_package
now accepts --no-install-recommends
as argument.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me add these thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
9e771d2
to
d1a33e4
Compare
d1a33e4
to
2653471
Compare
tests/lib/pkgdb.sh
Outdated
;; | ||
fedora-*) | ||
dnf -q -y install -y "$DNF_FLAGS" $package_name | ||
dnf -q -y install "$DNF_FLAGS" -y $package_name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you doing -y
twice? It's already being used as a global flag...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're faster than me, already about to push another change to fix that.
14024d4
to
0465786
Compare
tests/lib/pkgdb.sh
Outdated
;; | ||
opensuse-*) | ||
zypper -q install -y "$ZYPPER_FLAGS" $package_name | ||
zypper -q install "$ZYPPER_FLAGS" $package_name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You still need -y
after install subcommand for Zypper.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Narf. Never do multiple things at the same time :-)
0465786
to
9926015
Compare
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There's an issue with the management of |
@fgimenez Thanks, yeah I saw that already. Has something to do with the quoting of APT_FLAGS, not yet sure what it is. |
No description provided.