<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-cloud-init.git/cloudinit/conftest.py, branch 22.1</title>
<subtitle> (mirror of https://github.com/marekm72/vyos-cloud-init.git)
</subtitle>
<id>https://git.amelek.net/marekm72/vyos-cloud-init.git/atom?h=22.1</id>
<link rel='self' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/atom?h=22.1'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/'/>
<updated>2020-06-08T21:08:43+00:00</updated>
<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/marekm72/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>
<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/marekm72/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>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/marekm72/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>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/marekm72/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>conftest: introduce disable_subp_usage autouse fixture (#304)</title>
<updated>2020-04-23T19:34:07+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-04-23T19:34:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=845a393d8bb641216b1d311b09486b0aa19f1e9c'/>
<id>urn:sha1:845a393d8bb641216b1d311b09486b0aa19f1e9c</id>
<content type='text'>
This mirrors the behaviour of CiTestCase.allowed_subp, by causing all
calls to util.subp to raise an AssertionError.</content>
</entry>
</feed>
