Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
tests: install most important snaps #3692
Conversation
sergiocazzolato
added some commits
Aug 3, 2017
| @@ -0,0 +1,82 @@ | ||
| +summary: Check install popular snaps |
zyga
Aug 9, 2017
Contributor
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.
mvo5
Aug 9, 2017
Collaborator
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.
| +manual: true | ||
| + | ||
| +environment: | ||
| + # High Profile |
sergiocazzolato
Aug 11, 2017
Contributor
Well, I'll do until we implement a way to get automatically that list. I'll be working on that.
| + break | ||
| + done | ||
| + | ||
| + snap list | grep -q -E $SNAP |
mvo5
reviewed
Aug 9, 2017
Thanks for this PR! Some nitpicks and suggestions inside but no blockers.
| @@ -0,0 +1,82 @@ | ||
| +summary: Check install popular snaps |
zyga
Aug 9, 2017
Contributor
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.
mvo5
Aug 9, 2017
Collaborator
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.
| + SNAP/vault: vault | ||
| + | ||
| +execute: | | ||
| + CHANNELS=(stable candidate beta edge) |
mvo5
Aug 9, 2017
Collaborator
(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
...
| +execute: | | ||
| + CHANNELS=(stable candidate beta edge) | ||
| + for CHANNEL in "${CHANNELS[@]}"; do | ||
| + CHANNEL_INFO="$(snap info $SNAP | grep " $CHANNEL: ")" || exit |
mvo5
Aug 9, 2017
Collaborator
(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 :)
codecov-io
commented
Aug 9, 2017
•
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.
|
sergiocazzolato commentedAug 9, 2017
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.