<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-cloud-init.git/cloudinit/tests, branch 20.3</title>
<subtitle> (mirror of https://github.com/vyos/vyos-cloud-init.git)
</subtitle>
<id>https://git.amelek.net/vyos/vyos-cloud-init.git/atom?h=20.3</id>
<link rel='self' href='https://git.amelek.net/vyos/vyos-cloud-init.git/atom?h=20.3'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/'/>
<updated>2020-07-02T17:51:28+00:00</updated>
<entry>
<title>tests: use markers to configure disable_subp_usage (#473)</title>
<updated>2020-07-02T17:51:28+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-07-02T17:51:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=2b727914e8cbee6810b1bb9a1cfdb90ad521ceb6'/>
<id>urn:sha1:2b727914e8cbee6810b1bb9a1cfdb90ad521ceb6</id>
<content type='text'>
This is an improvement over indirect parameterisation for a few reasons:

* The test code is much easier to read, the mark names are much more
  intuitive than the indirect parameterisation invocation, and there's
  less boilerplate to boot
* The fixture no longer has to overload the single parameter that
  fixtures can take with multiple meanings</content>
</entry>
<entry>
<title>test_util: add (partial) testing for util.mount_cb (#463)</title>
<updated>2020-06-29T13:10:50+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-06-29T13:10:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=597be5e0722395638582ba541f61b29c6a7b444d'/>
<id>urn:sha1:597be5e0722395638582ba541f61b29c6a7b444d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Move subp into its own module. (#416)</title>
<updated>2020-06-08T16:49:12+00:00</updated>
<author>
<name>Scott Moser</name>
<email>smoser@brickies.net</email>
</author>
<published>2020-06-08T16:49:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=3c551f6ebc12f7729a2755c89b19b9000e27cc88'/>
<id>urn:sha1:3c551f6ebc12f7729a2755c89b19b9000e27cc88</id>
<content type='text'>
This was painful, but it finishes a TODO from cloudinit/subp.py.

It moves the following from util to subp:
  ProcessExecutionError
  subp
  which
  target_path

I moved subp_blob_in_tempfile into cc_chef, which is its only caller.
That saved us from having to deal with it using write_file
and temp_utils from subp (which does not import any cloudinit things now).

It is arguable that 'target_path' could be moved to a 'path_utils' or
something, but in order to use it from subp and also from utils,
we had to get it out of utils.</content>
</entry>
<entry>
<title>New feature flag functionality and fix includes failing silently (#367)</title>
<updated>2020-06-04T13:50:20+00:00</updated>
<author>
<name>James Falcon</name>
<email>TheRealFalcon@users.noreply.github.com</email>
</author>
<published>2020-06-04T13:50:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=d0b69e1815db131e893e64745a078780f33097af'/>
<id>urn:sha1:d0b69e1815db131e893e64745a078780f33097af</id>
<content type='text'>
Build time feature flags are now defined in cloudinit/features.py.
Feature flags can be added to toggle configuration options or
deprecated features. Feature flag overrides can be placed in
cloudinit/feature_overrides.py. Further documentation can be found in
HACKING.rst.

Additionally, updated default behavior to exit with an exception
if #include can't retrieve resources as expected. This behavior
can be toggled with a feature flag.

LP: #1734939</content>
</entry>
<entry>
<title>test: fix all flake8 E241 (#403)</title>
<updated>2020-06-02T15:24:29+00:00</updated>
<author>
<name>Joshua Powers</name>
<email>josh.powers@canonical.com</email>
</author>
<published>2020-06-02T15:24:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=5f7825e22241423322dbe628de1b00289cf34114'/>
<id>urn:sha1:5f7825e22241423322dbe628de1b00289cf34114</id>
<content type='text'>
Remove extra spaces after a ','</content>
</entry>
<entry>
<title>conftest: implement partial disable_subp_usage (#371)</title>
<updated>2020-05-21T14:24:18+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-05-21T14:24:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=de9c02a4c09d603bdfe5d23478e6c050223d79b6'/>
<id>urn:sha1:de9c02a4c09d603bdfe5d23478e6c050223d79b6</id>
<content type='text'>
This allows tests to be configured to permit some commands to be run via
util.subp, while still rejecting any unexpected calls.  See the
documentation for further details.</content>
</entry>
<entry>
<title>cloudinit: minor pylint fixes (#360)</title>
<updated>2020-05-14T19:39:19+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-05-14T19:39:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=09492b1d0f4b1826a7a98709c61d48bf14a1ec64'/>
<id>urn:sha1:09492b1d0f4b1826a7a98709c61d48bf14a1ec64</id>
<content type='text'>
We recently discovered that pylint is failing to report some errors when
invoked across our entire codebase (see
https://github.com/PyCQA/pylint/issues/3611).  I've run pylint across
every Python file under cloudinit/[0], and this commit fixes the issues
so-discovered.

[0] find cloudinit/ -name "*.py" | xargs -n 1 -t .tox/pylint/bin/python -m pylint</content>
</entry>
<entry>
<title>cloudinit: remove unneeded __future__ imports (#362)</title>
<updated>2020-05-14T15:25:02+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-05-14T15:25:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=4261ae538563d262bc76b8c55f7cc0c8abb14b00'/>
<id>urn:sha1:4261ae538563d262bc76b8c55f7cc0c8abb14b00</id>
<content type='text'>
We live in the future now.</content>
</entry>
<entry>
<title>conftest: add docs and tests regarding CiTestCase's subp functionality (#343)</title>
<updated>2020-05-12T18:09:40+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-05-12T18:09:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=c8f20b31cd57443b1bef17579dfceca432420c94'/>
<id>urn:sha1:c8f20b31cd57443b1bef17579dfceca432420c94</id>
<content type='text'>
And raise TypeError when subp called with no args, which more accurately mirrors normal behaviour:

&gt;&gt;&gt; from cloudinit.util import subp
&gt;&gt;&gt; subp()
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
TypeError: subp() missing 1 required positional argument: 'args'</content>
</entry>
<entry>
<title>cloudinit: drop dependencies on unittest2 and contextlib2 (#322)</title>
<updated>2020-04-24T13:26:51+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-04-24T13:26:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=38a7e6e9756fdab31264c0d6e93d20432ed111ac'/>
<id>urn:sha1:38a7e6e9756fdab31264c0d6e93d20432ed111ac</id>
<content type='text'>
These libraries provide backports of Python 3's stdlib components to Python 2. As we only support Python 3, we can simply use the stdlib now. This pull request does the following:

* removes some unneeded compatibility code for the old spelling of `assertRaisesRegex`
* replaces invocations of the Python 2-only `assertItemsEqual` with its new name, `assertCountEqual`
* replaces all usage of `unittest2` with `unittest`
* replaces all usage of `contextlib2` with `contextlib`
* drops `unittest2` and `contextlib2` from requirements files and tox.ini

It also rewrites some `test_azure` helpers to use bare asserts. We were seeing a strange error in xenial builds of this branch which appear to be stemming from the AssertionError that pytest produces being _different_ from the standard AssertionError.  This means that the modified helpers weren't behaving correctly, because they weren't catching AssertionErrors as one would expect. (I believe this is related, in some way, to https://github.com/pytest-dev/pytest/issues/645, but the only version of pytest where we're affected is so far in the past that it's not worth pursuing it any further as we have a workaround.)</content>
</entry>
</feed>
