Merge lp:~allenap/maas/virt-detect-nonzero--bug-1591958-warts into lp:~maas-committers/maas/trunk

Proposed by Gavin Panella
Status: Merged
Approved by: Gavin Panella
Approved revision: no longer in the source branch.
Merged at revision: 5124
Proposed branch: lp:~allenap/maas/virt-detect-nonzero--bug-1591958-warts
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 25 lines (+3/-2)
1 file modified
src/provisioningserver/refresh/tests/test_node_info_scripts.py (+3/-2)
To merge this branch: bzr merge lp:~allenap/maas/virt-detect-nonzero--bug-1591958-warts
Reviewer Review Type Date Requested Status
Blake Rouse (community) Approve
Review via email: mp+297314@code.launchpad.net

Commit message

Fix a couple of warts in TestVirtualityScript.

To post a comment you must log in.
Revision history for this message
Gavin Panella (allenap) :
Revision history for this message
Blake Rouse (blake-rouse) :
review: Approve
Revision history for this message
MAAS Lander (maas-lander) wrote :
Download full text (1.3 MiB)

The attempt to merge lp:~allenap/maas/virt-detect-nonzero--bug-1591958-warts into lp:maas failed. Below is the output from the failed tests.

Hit:1 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial-updates InRelease [94.5 kB]
Hit:3 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial-backports InRelease
Get:4 http://security.ubuntu.com/ubuntu xenial-security InRelease [94.5 kB]
Fetched 189 kB in 0s (395 kB/s)
Reading package lists...
sudo DEBIAN_FRONTEND=noninteractive apt-get -y \
    --no-install-recommends install apache2 archdetect-deb authbind bash bind9 bind9utils build-essential bzr bzr-builddeb chromium-browser chromium-chromedriver curl daemontools debhelper dh-apport dh-systemd distro-info dnsutils firefox freeipmi-tools git gjs ipython isc-dhcp-common libjs-angularjs libjs-jquery libjs-jquery-hotkeys libjs-yui3-full libjs-yui3-min libpq-dev make nodejs-legacy npm postgresql pxelinux python3-all python3-apt python3-bson python3-convoy python3-crochet python3-cssselect python3-curtin python3-dev python3-distro-info python3-django python3-django-nose python3-django-piston3 python3-dnspython python3-docutils python3-formencode python3-hivex python3-httplib2 python3-jinja2 python3-jsonschema python3-lxml python3-netaddr python3-netifaces python3-novaclient python3-oauth python3-oauthlib python3-openssl python3-paramiko python3-petname python3-pexpect python3-psycopg2 python3-pyinotify python3-pyparsing python3-pyvmomi python3-requests python3-seamicroclient python3-setuptools python3-simplestreams python3-sphinx python3-tempita python3-twisted python3-txtftp python3-tz python3-yaml python3-zope.interface python-bson python-crochet python-django python-django-piston python-djorm-ext-pgarray python-formencode python-lxml python-netaddr python-netifaces python-pocket-lint python-psycopg2 python-simplejson python-tempita python-twisted python-yaml socat syslinux-common tgt ubuntu-cloudimage-keyring wget xvfb
Reading package lists...
Building dependency tree...
Reading state information...
apache2 is already the newest version (2.4.18-2ubuntu3).
archdetect-deb is already the newest version (1.117ubuntu2).
authbind is already the newest version (2.1.1+nmu1).
bash is already the newest version (4.3-14ubuntu1).
build-essential is already the newest version (12.1ubuntu2).
bzr is already the newest version (2.7.0-2ubuntu1).
curl is already the newest version (7.47.0-1ubuntu2).
debhelper is already the newest version (9.20160115ubuntu3).
distro-info is already the newest version (0.14build1).
freeipmi-tools is already the newest version (1.4.11-1ubuntu1).
git is already the newest version (1:2.7.4-0ubuntu1).
isc-dhcp-common is already the newest version (4.3.3-5ubuntu12).
libjs-angularjs is already the newest version (1.2.28-1ubuntu2).
libjs-jquery is already the newest version (1.11.3+dfsg-4).
libjs-yui3-full is already the newest version (3.5.1-1ubuntu3).
libjs-yui3-min is already the newest version (3.5.1-1ubuntu3).
make is already the newest version (4.1-6).
postgresql is already the newest version (9.5+173).
pxelinux is already the newest ...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/provisioningserver/refresh/tests/test_node_info_scripts.py'
2--- src/provisioningserver/refresh/tests/test_node_info_scripts.py 2016-06-13 12:05:49 +0000
3+++ src/provisioningserver/refresh/tests/test_node_info_scripts.py 2016-06-14 10:47:45 +0000
4@@ -38,6 +38,7 @@
5 from testtools.content import text_content
6 from testtools.matchers import (
7 Equals,
8+ HasLength,
9 MatchesAny,
10 Not,
11 )
12@@ -821,11 +822,11 @@
13 return check_output((script.path,), stderr=STDOUT, env=env)
14 except CalledProcessError as error:
15 self.addDetail("output", text_content(
16- error.output.decode("ascii", "replace")))
17+ error.output.decode("utf-8", "replace")))
18 raise
19
20 def test_runs_locally(self):
21- self.assertThat(self.run_script(), Not(Equals("")))
22+ self.assertThat(self.run_script().strip(), Not(HasLength(0)))
23
24 def test_runs_successfully_when_systemd_detect_virt_returns_nonzero(self):
25 # Replace symlink to systemd-detect-virt with a script of our making.