snaps tests fail because of the new current link

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

Bug Description

snapd in zesty now creates a symlink from ~/snap/<name>/current to ~/snap/<name>/<revision>. This is causing the busybox and mosquitto snaps tests fail:

======================================================================
ERROR: demos_tests.test_busybox.BusyBoxTestCase.test_busybox
----------------------------------------------------------------------
output: {{{b"rm: cannot remove '/home/ubuntu/snap/busybox/x1/busybox.test': No such file or directory\n"}}}

Traceback (most recent call last):
  File "/tmp/autopkgtest.AovD16/build.Nh9/snapcraft/snaps_tests/__init__.py", line 242, in run_command_in_snappy_testbed
    return self.snappy_testbed.run_command(command, cwd)
  File "/tmp/autopkgtest.AovD16/build.Nh9/snapcraft/snaps_tests/testbed.py", line 40, in run_command
    stderr=subprocess.STDOUT).decode('utf-8')
  File "/usr/lib/python3.5/subprocess.py", line 316, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.5/subprocess.py", line 398, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'rm ~/snap/busybox/*/busybox.test' returned non-zero exit status 1

======================================================================
FAIL: demos_tests.test_mosquitto.MosquittoTestCase.test_mosquitto
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/autopkgtest.AovD16/build.Nh9/snapcraft/snaps_tests/demos_tests/test_mosquitto.py", line 46, in test_mosquitto
    'MQTT subscriber connected.\n'
  File "/tmp/autopkgtest.AovD16/build.Nh9/snapcraft/snaps_tests/__init__.py", line 231, in assert_command_in_snappy_testbed
    self.assertEqual(expected_output, output)
  File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 350, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 435, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: !=:
reference = '''\
MQTT subscriber connected.
test-mosquitto-topic b'test-message'
test-mosquitto-topic b'exit'
'''
actual = '''\
MQTT subscriber connected.
test-mosquitto-topic b'test-message'
test-mosquitto-topic b'exit'
MQTT subscriber connected.
test-mosquitto-topic b'test-message'
test-mosquitto-topic b'exit'
'''

Tags: tests
Revision history for this message
Leo Arias (elopio) wrote :

Priority set to critical because this would block landings on the archive.

Revision history for this message
Leo Arias (elopio) wrote :
Changed in snapcraft:
status: In Progress → Fix Committed
Changed in snapcraft:
status: Fix Committed → 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.