<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-cloud-init.git/cloudinit/tests, branch current</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=current</id>
<link rel='self' href='https://git.amelek.net/vyos/vyos-cloud-init.git/atom?h=current'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/'/>
<updated>2021-12-03T20:11:46+00:00</updated>
<entry>
<title>Reorganize unit test locations under tests/unittests (#1126)</title>
<updated>2021-12-03T20:11:46+00:00</updated>
<author>
<name>Brett Holman</name>
<email>bholman.devel@gmail.com</email>
</author>
<published>2021-12-03T20:11:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=039c40f9b3d88ee8158604bb18ca4bf2fb5d5e51'/>
<id>urn:sha1:039c40f9b3d88ee8158604bb18ca4bf2fb5d5e51</id>
<content type='text'>
This attempts to standardize unit test file location under test/unittests/
such that any source file located at cloudinit/path/to/file.py may have a
corresponding unit test file at test/unittests/path/to/test_file.py.

Noteworthy Comments:
====================
Four different duplicate test files existed:
test_{gpg,util,cc_mounts,cc_resolv_conf}.py
Each of these duplicate file pairs has been merged together. This is a
break in git history for these files.

The test suite appears to have a dependency on test order. Changing test
order causes some tests to fail. This should be rectified, but for now
some tests have been modified in
tests/unittests/config/test_set_passwords.py.

A helper class name starts with "Test" which causes pytest to try
executing it as a test case, which then throws warnings "due to Class
having __init__()".  Silence by changing the name of the class.

# helpers.py is imported in many test files, import paths change
cloudinit/tests/helpers.py -&gt; tests/unittests/helpers.py

# Move directories:
cloudinit/distros/tests -&gt; tests/unittests/distros
cloudinit/cmd/devel/tests -&gt; tests/unittests/cmd/devel
cloudinit/cmd/tests -&gt; tests/unittests/cmd/
cloudinit/sources/helpers/tests -&gt; tests/unittests/sources/helpers
cloudinit/sources/tests -&gt; tests/unittests/sources
cloudinit/net/tests -&gt; tests/unittests/net
cloudinit/config/tests -&gt; tests/unittests/config
cloudinit/analyze/tests/ -&gt; tests/unittests/analyze/

# Standardize tests already in tests/unittests/
test_datasource -&gt; sources
test_distros -&gt; distros
test_vmware -&gt; sources/vmware
test_handler -&gt; config        # this contains cloudconfig module tests
test_runs -&gt; runs</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>Allow comments in runcmd and report failed commands correctly (#1049)</title>
<updated>2021-10-07T20:08:13+00:00</updated>
<author>
<name>Brett Holman</name>
<email>bpholman5@gmail.com</email>
</author>
<published>2021-10-07T20:08:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=725a7f7f19eb39b472e1f24b447fc9a596bf1748'/>
<id>urn:sha1:725a7f7f19eb39b472e1f24b447fc9a596bf1748</id>
<content type='text'>
Allow comments in runcmd and report failed commands correctly

A `runcmd` script may fail to parse properly, but does not mark
`runcmd` as failed when that occurs. Additionally `shellify()` fails
to correctly parse scripts that contain a comment line.

Rectify both issues and add unit tests to verify correct behavior.

LP: #1853146</content>
</entry>
<entry>
<title>tox: bump the pinned flake8 and pylint version (#1029)</title>
<updated>2021-09-21T20:28:30+00:00</updated>
<author>
<name>Paride Legovini</name>
<email>paride.legovini@canonical.com</email>
</author>
<published>2021-09-21T20:28:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=089a307db1fc572461eea1589f1876132c058311'/>
<id>urn:sha1:089a307db1fc572461eea1589f1876132c058311</id>
<content type='text'>
tox: bump the pinned flake8 and pylint version

* pylint: fix W1406 (redundant-u-string-prefix)

The u prefix for strings is no longer necessary in Python &gt;=3.0.

* pylint: disable W1514 (unspecified-encoding)
    
From https://www.python.org/dev/peps/pep-0597/ (Python 3.10):
    
The new warning stems form https://www.python.org/dev/peps/pep-0597,
which says:
    
  Developers using macOS or Linux may forget that the default encoding
  is not always UTF-8. [...] Even Python experts may assume that the
  default encoding is UTF-8. This creates bugs that only happen on Windows.
    
The warning could be fixed by always specifying encoding='utf-8',
however we should be careful to not break environments which are not
utf-8 (or explicitly state that only utf-8 is supported). Let's silence
the warning for now.

* _quick_read_instance_id: cover the case where load_yaml() returns None

Spotted by pylint:
 - E1135 (unsupported-membership-test)
 - E1136 (unsubscriptable-object)

LP: #1944414</content>
</entry>
<entry>
<title>Support openEuler OS (#1012)</title>
<updated>2021-09-13T18:21:28+00:00</updated>
<author>
<name>zhuzaifangxuele</name>
<email>52022596+zhuzaifangxuele@users.noreply.github.com</email>
</author>
<published>2021-09-13T18:21:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=f4c47e3e25d1fb79e2673e37f8fc67750d025be2'/>
<id>urn:sha1:f4c47e3e25d1fb79e2673e37f8fc67750d025be2</id>
<content type='text'>
openEuler Homepage: https://www.openeuler.org/en/</content>
</entry>
<entry>
<title>Add CloudLinux OS support (#1003)</title>
<updated>2021-09-01T19:01:09+00:00</updated>
<author>
<name>Alexandr Kravchenko</name>
<email>sasha121196@mail.ru</email>
</author>
<published>2021-09-01T19:01:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=f6c71fd758a3589ac5f62fd251d60b00edf5bb1c'/>
<id>urn:sha1:f6c71fd758a3589ac5f62fd251d60b00edf5bb1c</id>
<content type='text'>
https://www.cloudlinux.com/</content>
</entry>
<entry>
<title>Add support for EuroLinux 7 &amp;&amp; EuroLinux 8 (#957)</title>
<updated>2021-08-05T16:32:36+00:00</updated>
<author>
<name>Aleksander Baranowski</name>
<email>aleksander.baranowski@yahoo.pl</email>
</author>
<published>2021-08-05T16:32:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=3d9c862b6ded798031fad827328fa437bc14ac97'/>
<id>urn:sha1:3d9c862b6ded798031fad827328fa437bc14ac97</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add VZLinux support (#951)</title>
<updated>2021-07-21T20:48:05+00:00</updated>
<author>
<name>eb3095</name>
<email>45504889+eb3095@users.noreply.github.com</email>
</author>
<published>2021-07-21T20:48:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=4257e30ac4b8730af35c078f2df0a2234dd19ffa'/>
<id>urn:sha1:4257e30ac4b8730af35c078f2df0a2234dd19ffa</id>
<content type='text'>
Virtuozzo Linux is a distro based off of CentOS 8, similar to Alma Linux and Rocky Linux.</content>
</entry>
<entry>
<title>Add support for VMware PhotonOS (#909)</title>
<updated>2021-06-18T16:53:44+00:00</updated>
<author>
<name>sshedi</name>
<email>53473811+sshedi@users.noreply.github.com</email>
</author>
<published>2021-06-18T16:53:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=35aa9db6f8e2ba05d366776c0e8d97f52217e930'/>
<id>urn:sha1:35aa9db6f8e2ba05d366776c0e8d97f52217e930</id>
<content type='text'>
Also added a new (currently experimental) systemd-networkd renderer,
and includes a small refactor to cc_resolv_conf.py to support the
resolved.conf used by systemd-resolved.</content>
</entry>
<entry>
<title>- Create the log file with 640 permissions (#858)</title>
<updated>2021-06-02T21:10:32+00:00</updated>
<author>
<name>Robert Schweikert</name>
<email>rjschwei@suse.com</email>
</author>
<published>2021-06-02T21:10:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=29ac50f2b9e7634fc59fc161d77d27e970ae8080'/>
<id>urn:sha1:29ac50f2b9e7634fc59fc161d77d27e970ae8080</id>
<content type='text'>
Security scanners are often simple minded and complain on arbitrary
settings such as file permissions. For /var/log/* having world read is
one of these cases.</content>
</entry>
</feed>
