tests: install most important snaps #3692

Merged
merged 11 commits into from Aug 24, 2017

Conversation

Projects
None yet
5 participants
Contributor

sergiocazzolato commented Aug 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.

sergiocazzolato added some commits Aug 3, 2017

tests: adding test to install popular snaps
This test has been required to install popular snaps and check the
installation can be done without any problem.
Merge branch 'tests-install-most-important-snaps' of github.com:sergi…
…ocazzolato/snapd into tests-install-most-important-snaps
@@ -0,0 +1,82 @@
+summary: Check install popular snaps
@zyga

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

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.

@zyga

zyga Aug 9, 2017

Contributor

Aha, I missed that.

@sergiocazzolato

sergiocazzolato Aug 11, 2017

Contributor

Added details explaning that

+manual: true
+
+environment:
+ # High Profile
@zyga

zyga Aug 9, 2017

Contributor

Who will maintain this list over time?

@sergiocazzolato

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.

tests/main/install-snaps/task.yaml
+ break
+ done
+
+ snap list | grep -q -E $SNAP
@zyga

zyga Aug 9, 2017

Contributor

Let's use MATCH here

Thanks for this PR! Some nitpicks and suggestions inside but no blockers.

@@ -0,0 +1,82 @@
+summary: Check install popular snaps
@zyga

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

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.

@zyga

zyga Aug 9, 2017

Contributor

Aha, I missed that.

@sergiocazzolato

sergiocazzolato Aug 11, 2017

Contributor

Added details explaning that

tests/main/install-snaps/task.yaml
+ SNAP/vault: vault
+
+execute: |
+ CHANNELS=(stable candidate beta edge)
@mvo5

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
...
@sergiocazzolato

sergiocazzolato Aug 11, 2017

Contributor

sure, change done, thanks for reviewing

tests/main/install-snaps/task.yaml
+execute: |
+ CHANNELS=(stable candidate beta edge)
+ for CHANNEL in "${CHANNELS[@]}"; do
+ CHANNEL_INFO="$(snap info $SNAP | grep " $CHANNEL: ")" || exit
@mvo5

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 :)

@sergiocazzolato

sergiocazzolato Aug 11, 2017

Contributor

ok, I'll add the echo.

codecov-io commented Aug 9, 2017

Codecov Report

Merging #3692 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
wrappers/binaries.go 72.72% <0%> (-6.82%) ⬇️
cmd/snap/cmd_aliases.go 93.33% <0%> (-1.67%) ⬇️
interfaces/sorting.go 98.71% <0%> (-1.29%) ⬇️
overlord/ifacestate/helpers.go 62.33% <0%> (ø) ⬆️

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 6cc76e4...bc6e0fb. Read the comment docs.

sergiocazzolato added some commits Aug 9, 2017

Contributor

sergiocazzolato commented Aug 17, 2017

@zyga @mvo changes ready, just failing some tests because the refresh-all tests are failing on autopkgtest

zyga approved these changes Aug 24, 2017

@zyga zyga merged commit 789c8b4 into snapcore:master Aug 24, 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