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: install most important snaps #3692
tests: install most important snaps #3692
Conversation
This test has been required to install popular snaps and check the installation can be done without any problem.
…ocazzolato/snapd into tests-install-most-important-snaps
@@ -0,0 +1,82 @@ | |||
summary: Check install popular snaps |
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.
I'm not super keen on having this in the main suite where it blocks all PRs.
Ideally (at least for me, obviously) this would be a nightly suite that we use as a go/no-go test for releases.
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.
I think this is what is happening, note that the test is makred with "manual: true" below. However I think we should mention this in either the description or the summay.
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.
Aha, I missed that.
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.
Added details explaning that
manual: true | ||
|
||
environment: | ||
# High Profile |
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.
Who will maintain this list over time?
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.
Well, I'll do until we implement a way to get automatically that list. I'll be working on that.
tests/main/install-snaps/task.yaml
Outdated
break | ||
done | ||
|
||
snap list | grep -q -E $SNAP |
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's use MATCH 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.
Thanks for this PR! Some nitpicks and suggestions inside but no blockers.
@@ -0,0 +1,82 @@ | |||
summary: Check install popular snaps |
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.
I think this is what is happening, note that the test is makred with "manual: true" below. However I think we should mention this in either the description or the summay.
tests/main/install-snaps/task.yaml
Outdated
SNAP/vault: vault | ||
|
||
execute: | | ||
CHANNELS=(stable candidate beta edge) |
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.
(nitpick, not really important as we use bash in spread anyway but I can't help it, years of ensuring maintainer scripts work with dash (instead of bash) have tained me :)) - if you want to write this in portable "sh" instead of bash you could simpliy write it as.
CHANNELS="stable candidate beta edge"
for CHANNEL in $CHANNELS; do
...
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.
sure, change done, thanks for reviewing
tests/main/install-snaps/task.yaml
Outdated
execute: | | ||
CHANNELS=(stable candidate beta edge) | ||
for CHANNEL in "${CHANNELS[@]}"; do | ||
CHANNEL_INFO="$(snap info $SNAP | grep " $CHANNEL: ")" || exit |
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.
(nitpick) I find it harder to read the postfix || && than using "if ...; then", I would prefer converting it. I assume this is for snaps that are not actually in the store (anymore) ? If so, maybe we can also have an echo like "skippping test for $SNAP" or something? And if spread grows a warning feaure we can emit a proper warning 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.
ok, I'll add the echo.
Codecov Report
@@ Coverage Diff @@
## master #3692 +/- ##
==========================================
- Coverage 75.81% 75.79% -0.02%
==========================================
Files 402 402
Lines 34745 34745
==========================================
- Hits 26341 26336 -5
- Misses 6529 6533 +4
- Partials 1875 1876 +1
Continue to review full report at Codecov.
|
This branch adds a tests which installs a set of snaps form different channels.
The basic idea is to test that most important snaps can be installed and there is not any failure in the process. This test will be executed nightly with spread cron.
The test autodetects the channel and mode for each snap.