<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-cloud-init.git/conftest.py, branch sagitta-public-unmaintained</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=sagitta-public-unmaintained</id>
<link rel='self' href='https://git.amelek.net/vyos/vyos-cloud-init.git/atom?h=sagitta-public-unmaintained'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/'/>
<updated>2022-01-10T22:56:29+00:00</updated>
<entry>
<title>Remove 3.5 and xenial support (SC-711) (#1167)</title>
<updated>2022-01-10T22:56:29+00:00</updated>
<author>
<name>James Falcon</name>
<email>james.falcon@canonical.com</email>
</author>
<published>2022-01-10T22:56:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=dc1aabfca851e520693c05322f724bd102c76364'/>
<id>urn:sha1:dc1aabfca851e520693c05322f724bd102c76364</id>
<content type='text'>
Includes:
 - Update tox.ini and .travis.yml accordingly
 - Cleanup tox.ini with new tox syntax and cloud-init dependencies
 - Update documentation accordingly
 - Replace/remove xenial references where additional testing isn't required
 - Remove xenial checks in integration tests
 - Replace yield_fixture with fixture in pytest tests

Sections of code commented with lines like "Remove when Xenial is no
longer supported" still exist as they're require additional testing.</content>
</entry>
<entry>
<title>Adopt Black and isort (SC-700) (#1157)</title>
<updated>2021-12-16T02:16:38+00:00</updated>
<author>
<name>James Falcon</name>
<email>james.falcon@canonical.com</email>
</author>
<published>2021-12-16T02:16:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=bae9b11da9ed7dd0b16fe5adeaf4774b7cc628cf'/>
<id>urn:sha1:bae9b11da9ed7dd0b16fe5adeaf4774b7cc628cf</id>
<content type='text'>
Applied Black and isort, fixed any linting issues, updated tox.ini
and CI.
</content>
</entry>
<entry>
<title>testing: monkeypatch system_info call in unit tests (SC-533) (#1117)</title>
<updated>2021-11-22T22:56:41+00:00</updated>
<author>
<name>James Falcon</name>
<email>james.falcon@canonical.com</email>
</author>
<published>2021-11-22T22:56:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=31daf6670aeeba1d452c70bc0d4d04139652be36'/>
<id>urn:sha1:31daf6670aeeba1d452c70bc0d4d04139652be36</id>
<content type='text'>
testing: monkeypatch system_info call in unit tests

system_info can make calls that read or write from the filesystem, which
should require special mocking. It is also decorated with 'lru_cache',
which means test authors often don't realize they need to be mocking.
Also, we don't actually want the results from the user's local
machine, so monkeypatching it across all tests should be reasonable.

Additionally, moved some of 'system_info` into a helper function to
reduce the surface area of the monkeypatch, added tests for the new
function (and fixed a bug as a result), and removed related mocks that
should be no longer needed.</content>
</entry>
<entry>
<title>conftest: improve docstring for disable_subp_usage (#644)</title>
<updated>2020-11-02T15:20:02+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-11-02T15:20:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=815a790cafc4e78edc5a2b631396d7fedb424bcf'/>
<id>urn:sha1:815a790cafc4e78edc5a2b631396d7fedb424bcf</id>
<content type='text'>
Specifically by fixing references to `util`, adding some missing
formatting, and adding information about a corner case of mock usage
that `disable_subp_usage` breaks.</content>
</entry>
<entry>
<title>conftest.py: remove top-level import of httpretty (#599)</title>
<updated>2020-10-06T14:52:20+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-10-06T14:52:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=5435205decf3c8582258d0782dc54aebdd154212'/>
<id>urn:sha1:5435205decf3c8582258d0782dc54aebdd154212</id>
<content type='text'>
This means that the integration tests do not need to install
test-requirements.txt in order to successfully import `conftest.py`.</content>
</entry>
<entry>
<title>DataSourceOracle: refactor to use only OPC v1 endpoint (#493)</title>
<updated>2020-08-10T19:11:23+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-08-10T19:11:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=a6bb375aef93a31395af9ce0985c49ada9fb7139'/>
<id>urn:sha1:a6bb375aef93a31395af9ce0985c49ada9fb7139</id>
<content type='text'>
The /opc/v1/ metadata endpoints[0] are universally available in Oracle
Cloud Infrastructure and the OpenStack endpoints are considered
deprecated, so we can refactor the data source to use the OPC endpoints
exclusively.  This simplifies the datasource code substantially, and
enables use of OPC-specific attributes in future.

[0] https://docs.cloud.oracle.com/en-us/iaas/Content/Compute/Tasks/gettingmetadata.htm</content>
</entry>
<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: move conftest.py to top-level, to cover tests/ also (#414)</title>
<updated>2020-06-08T21:08:43+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-06-08T21:08:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=87b8080f3163574580a207f15ff308da6010b0ff'/>
<id>urn:sha1:87b8080f3163574580a207f15ff308da6010b0ff</id>
<content type='text'>
* test_opennebula: convert TestParseShellConfig to a pytest test

And allow it to run bash.

(We aren't aiming to convert TestCase tests to pytest tests as a rule.
In this case, I needed to change its implementation to limit subp usage,
and I chose pytest over CiTestCase.)

* test: move conftest.py to top-level, to cover tests/ also

This gives us a single conftest.py which is shared by all tests in the
project.</content>
</entry>
</feed>
