<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-cloud-init.git/tests/unittests/test_data.py, branch rolling</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=rolling</id>
<link rel='self' href='https://git.amelek.net/vyos/vyos-cloud-init.git/atom?h=rolling'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/'/>
<updated>2021-12-16T02:16:38+00:00</updated>
<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>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>openstack: read the dynamic metadata group vendor_data2.json (#777)</title>
<updated>2021-02-05T16:11:14+00:00</updated>
<author>
<name>Andrew Bogott</name>
<email>Andrewbogott@gmail.com</email>
</author>
<published>2021-02-05T16:11:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=3cebe0df1e002bd85c8aa78e89f0ca507c17195a'/>
<id>urn:sha1:3cebe0df1e002bd85c8aa78e89f0ca507c17195a</id>
<content type='text'>
Add support for openstack's dynamic vendor data, which appears under openstack/latest/vendor_data2.json

This adds vendor_data2 to all pathways; it should be a no-op for non-OpenStack providers.

LP: #1841104</content>
</entry>
<entry>
<title>test_data: fix faulty patch (#476)</title>
<updated>2020-07-10T17:38:27+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-07-10T17:38:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=b9366677263ff7ec0f5b200900b22ba8871308a3'/>
<id>urn:sha1:b9366677263ff7ec0f5b200900b22ba8871308a3</id>
<content type='text'>
I've been seeing intermittent failures of this test, and I tracked it
down to something to do with`test_features.py`: running this test after
`test_features.py` causes the failure, but the inverse does not.

This fixed patch ensures that the test will pass regardless of ordering.</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>Fix cloud-init ignoring some misdeclared mimetypes in user-data.</title>
<updated>2020-03-31T15:57:23+00:00</updated>
<author>
<name>Kurt Garloff</name>
<email>kurt@garloff.de</email>
</author>
<published>2020-03-31T15:57:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=d00126c167fc06d913d99cfc184bf3402cb8cf53'/>
<id>urn:sha1:d00126c167fc06d913d99cfc184bf3402cb8cf53</id>
<content type='text'>
On some platforms (old heat on OpenTelekomCloud), the user-data mime part
is mislabeled x-shellscript.  cloud-init would not accept this unexpected
mime-type in multipart user-data.  Cloud-init will now run find_ctype()
on the content of the mime-part to check if it matches known include types.

This patch is from Ryan Harper (inspired by my bug report and a
suggestion from Scott Moser) from the discussion on PR #234.


Signed-off-by: Kurt Garloff &lt;kurt@garloff.de&gt;</content>
</entry>
<entry>
<title>cloudinit: replace "from six import X" imports (except in util.py) (#183)</title>
<updated>2020-01-31T15:15:31+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-01-31T15:15:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=1bb1896ec900622e02c1ffb59db4d3f2df4a964d'/>
<id>urn:sha1:1bb1896ec900622e02c1ffb59db4d3f2df4a964d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>cloudinit: remove ImportError handling for mock imports (#182)</title>
<updated>2020-01-23T21:32:01+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-01-23T21:32:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=6b157aa60a10fa74374287f0ec0313255e0462b4'/>
<id>urn:sha1:6b157aa60a10fa74374287f0ec0313255e0462b4</id>
<content type='text'>
We only run on Python 3 now, so we can unambiguously expect
unittest.mock to exist.</content>
</entry>
<entry>
<title>Add config for ssh-key import and consuming user-data</title>
<updated>2019-10-31T16:26:54+00:00</updated>
<author>
<name>Pavel Zakharov</name>
<email>pavel.zakharov@delphix.com</email>
</author>
<published>2019-10-31T16:26:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=45ea695f9b4fce180c662ab4211575d64912634e'/>
<id>urn:sha1:45ea695f9b4fce180c662ab4211575d64912634e</id>
<content type='text'>
This patch enables control over SSH public-key import and
discarding supplied user-data (both disabled by default).

  allow-userdata: false
  ssh:
    allow_public_ssh_keys: false

This feature enables closed appliances to prevent customers
from unintentionally breaking the appliance which were
not designed for user interaction.

The downstream change for this is here:
  https://github.com/delphix/cloud-init/pull/4
</content>
</entry>
<entry>
<title>Fix usages of yaml, and move yaml_dump to safeyaml.dumps.</title>
<updated>2019-10-24T20:02:15+00:00</updated>
<author>
<name>Scott Moser</name>
<email>smoser@brickies.net</email>
</author>
<published>2019-10-24T20:02:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=5bec6b0e2a2ce5fd03bb04f441536fc130e67997'/>
<id>urn:sha1:5bec6b0e2a2ce5fd03bb04f441536fc130e67997</id>
<content type='text'>
Here we replace uses of the pyyaml module directly with functions
provided by cloudinit.safeyaml.  Also, change/move
  cloudinit.util.yaml_dumps
to
  cloudinit.safeyaml.dumps

LP: #1849640
</content>
</entry>
</feed>
