The snapcraft install examples tests will fail if there's a snappy update in progress

Bug #1549053 reported by Leo Arias
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
Medium
Unassigned

Bug Description

If an snappy autoupdate occurs during the examples tests run, the snappy commands will wait for the update to finish, polluting the expected output of the tests:

_StringException: Traceback (most recent call last):
  File "/home/jenkins-slave/workspace/github-snapcraft-integration-tests-cloud/examples_tests/tests.py", line 100, in test_example
    self.install_snap(self.example_dir, self.name, self.version)
  File "/home/jenkins-slave/workspace/github-snapcraft-integration-tests-cloud/examples_tests/__init__.py", line 158, in install_snap
    self.assertThat(output, MatchesRegex(expected, flags=re.DOTALL))
  File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 435, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: 'Snappy is updating your system in the background. This may take some minutes.\nWill try again in 5 seconds...\nPress ctrl-c to cancel.\nInstalling godd_1.0_amd64.snap\nName Date Version Developer \ncanonical-pc 2016-02-02 3.0 canonical \ncanonical-pc-linux 2016-02-22 4.4.0-6-1 canonical \ngodd 2016-02-23 INNNcLXJgJdN sideload \nubuntu-core 2016-02-22 16.04.0-17 canonical \n' does not match /Installing godd_1.0_amd64.snap\n.*godd +.* +.* +sideload *\n.*/

We need to disable autoupdate on test setup.

Tags: tests
Leo Arias (elopio)
Changed in snapcraft:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Leo Arias (elopio) wrote :

This is blocked until snappy allows to disable updates.

tags: added: tests
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

Fixed with delayed updates

Changed in snapcraft:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.