cloud-init-dev team mailing list archive
-
cloud-init-dev team
-
Mailing list archive
-
Message #02866
Re: [Merge] ~smoser/cloud-init:bug/1703697-python3.6-ubuntu into cloud-init:master
We still need one more fix in cloud-init.
test_simple_run.py has some side effects, and makes test_create_users.py (and possibly others) succeed when they should not.
This was found when looking at bug 1704024. It seems that python 3.6 ends
up iterating through tests in a different order than 3.5.
$ python3 -m nose tests/unittests/test_runs/test_simple_run.py tests/unittests/test_distros/test_create_users.py
..........
----------------------------------------------------------------------
Ran 10 tests in 0.065s
OK
$ python3 -m nose tests/unittests/test_distros/test_create_users.pyF........
======================================================================
FAIL: test_basic (tests.unittests.test_distros.test_create_users.TestCreateUser)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/mock/mock.py", line 1305, in patched
return func(*args, **keywargs)
File "/home/smoser-public/src/cloud-init/cloud-init/tests/unittests/test_distros/test_create_users.py", line 63, in test_basic
mock.call(['passwd', '-l', user])])
AssertionError: [call(['systemd-detect-virt', '--quiet', '--conta[116 chars]r'])] != [call(['useradd', 'foouser', '-m'], logstring=['u[57 chars]r'])]
-------------------- >> begin captured logging << --------------------
cloudinit.util: DEBUG: Reading from /etc/os-release (quiet=True)
cloudinit.util: DEBUG: Read 407 bytes from /etc/os-release
cloudinit.util: DEBUG: Reading from /proc/1/cmdline (quiet=False)
cloudinit.util: DEBUG: Read 47 bytes from /proc/1/cmdline
cloudinit.util: DEBUG: Reading from /etc/system-image/channel.ini (quiet=True)
cloudinit.util: DEBUG: Read 0 bytes from /etc/system-image/channel.ini
cloudinit.distros: DEBUG: Adding user foouser
--------------------- >> end captured logging << ---------------------
----------------------------------------------------------------------
Ran 9 tests in 0.023s
FAILED (failures=1)
--
https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/327344
Your team cloud-init commiters is requested to review the proposed merge of ~smoser/cloud-init:bug/1703697-python3.6-ubuntu into cloud-init:master.
References