<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-cloud-init.git/tests/unittests/test_runs, branch circinus</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=circinus</id>
<link rel='self' href='https://git.amelek.net/vyos/vyos-cloud-init.git/atom?h=circinus'/>
<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>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>
<entry>
<title>stages: fix tracebacks if a module stage is undefined or empty</title>
<updated>2018-06-15T19:41:21+00:00</updated>
<author>
<name>Robert Schweikert</name>
<email>rjschwei@suse.com</email>
</author>
<published>2018-06-15T19:41:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=fef2616b9876d3d354b0de1a8e753361e52e77b0'/>
<id>urn:sha1:fef2616b9876d3d354b0de1a8e753361e52e77b0</id>
<content type='text'>
In /etc/cloud/cloud.cfg, users and imagees can configure which modules run
during a specific cloud-init stage by modifying one of the following
lists: cloud_init_modules, cloud_init_modules, cloud_init_final_modules.

If any of the configured module lists are absent or empty, cloud-init will
emit the same message it already does for existing lists that only contain
modules which are not unsupported on that platform:

No 'config' modules to run under section 'cloud_config_modules'

LP: #1770462
</content>
</entry>
<entry>
<title>net: Depend on iproute2's ip instead of net-tools ifconfig or route</title>
<updated>2018-04-18T21:22:42+00:00</updated>
<author>
<name>Chad Smith</name>
<email>chad.smith@canonical.com</email>
</author>
<published>2018-04-18T21:22:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=6d48d265a0548a2dc23e587f2a335d4e38e8db90'/>
<id>urn:sha1:6d48d265a0548a2dc23e587f2a335d4e38e8db90</id>
<content type='text'>
The net-tools package is deprecated and will eventually be dropped.  Use
"ip route", "link" or "address" instead of "ifconfig" or "route" calls.
Cloud-init can now run in an environment that no longer has net-tools.
This affects the network and route printing emitted to
cloud-config-output.log as well as the cc_disable_ec2_metadata module.

Additional changes:
 - separate readResource and resourceLocation into standalone test
   functions
 - Fix ipv4 address rows to report scopes represented by ip addr show
 - Formatted route/address ouput now handles multiple ipv4 and ipv6
   addresses on a single interface

Co-authored-by: James Hogarth &lt;james.hogarth@gmail.com&gt;
Co-authored-by: Robert Schweikert &lt;rjschwei@suse.com&gt;
</content>
</entry>
<entry>
<title>Datasources: Formalize DataSource get_data and related properties.</title>
<updated>2017-12-05T23:42:35+00:00</updated>
<author>
<name>Chad Smith</name>
<email>chad.smith@canonical.com</email>
</author>
<published>2017-12-05T23:42:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=0cf6db3617e0cebeb89c4809396f84360827e96c'/>
<id>urn:sha1:0cf6db3617e0cebeb89c4809396f84360827e96c</id>
<content type='text'>
Each DataSource subclass must define its own get_data method. This branch
formalizes our DataSource class to require that subclasses define an
explicit dsname for sourcing cloud-config datasource configuration.
Subclasses must also override the _get_data method or a
NotImplementedError is raised.

The branch also writes /run/cloud-init/instance-data.json. This file
contains all meta-data, user-data and vendor-data and a standardized set
of metadata keys in a json blob which other utilities with root-access
could make use of. Because some meta-data or user-data is potentially
sensitive the file is only readable by root.

Generally most metadata content types should be json serializable. If
specific keys or values are not serializable, those specific values will
be base64encoded and the key path will be listed under the top-level key
'base64-encoded-keys' in instance-data.json. If json writing fails due to
other TypeErrors or UnicodeDecodeErrors, a warning log will be emitted to
/var/log/cloud-init.log and no instance-data.json will be created.
</content>
</entry>
<entry>
<title>cloud-config modules: honor distros definitions in each module</title>
<updated>2017-09-14T04:26:03+00:00</updated>
<author>
<name>Chad Smith</name>
<email>chad.smith@canonical.com</email>
</author>
<published>2017-09-14T04:26:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=f761f2b5f58c8cf13cfee63619f32046216cf66a'/>
<id>urn:sha1:f761f2b5f58c8cf13cfee63619f32046216cf66a</id>
<content type='text'>
Modules can optionally define a list of supported distros on which they can run
by declaring a distros attribute in the cc_*py module. This branch fixes
handling of cloudinit.stages.Modules.run_section. The behavior of run_section
is now the following:
 - always run a module if the module doesn't declare a distros attribute
 - always run a module if the module declares distros = [ALL_DISTROS]
 - skip a module if the distribution on which we run isn't in module.distros
 - force a run of a skipped module if unverified_modules configuration contains
   the module name

LP: #1715738
LP: #1715690
</content>
</entry>
<entry>
<title>relocate tests/unittests/helpers.py to cloudinit/tests</title>
<updated>2017-09-05T17:03:59+00:00</updated>
<author>
<name>Lars Kellogg-Stedman</name>
<email>lars@redhat.com</email>
</author>
<published>2017-09-05T17:03:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=a3649e03206a3596131413956ea7ecc18790ec73'/>
<id>urn:sha1:a3649e03206a3596131413956ea7ecc18790ec73</id>
<content type='text'>
This moves the base test case classes into into cloudinit/tests and
updates all the corresponding imports.
</content>
</entry>
<entry>
<title>tests: fixes for issues uncovered when moving to python 3.6.</title>
<updated>2017-07-19T11:53:10+00:00</updated>
<author>
<name>Scott Moser</name>
<email>smoser@ubuntu.com</email>
</author>
<published>2017-07-13T00:16:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=865e941f3f88c7daeafbf1eab856e02ce2b6a5f7'/>
<id>urn:sha1:865e941f3f88c7daeafbf1eab856e02ce2b6a5f7</id>
<content type='text'>
This includes a few fixes found when testing with python 3.6.
 - fix eni renderer when target is None
   This just uses the util.target_path() in the event that target is None.
 - change test cases to not rely on the cached result of
   util.get_cmdline() and other cached globals. Update the base TestCase
   to unset that cache.
 - mock calls to system_is_snappy from the create_users test cases.
 - drop unused _pp_root in test_simple_run.py

LP: #1703697
</content>
</entry>
<entry>
<title>LICENSE: Allow dual licensing GPL-3 or Apache 2.0</title>
<updated>2016-12-22T22:04:28+00:00</updated>
<author>
<name>Jon Grimm</name>
<email>jon.grimm@canonical.com</email>
</author>
<published>2016-11-22T23:09:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=b2a9f33616c806ae6e052520a8589113308f567c'/>
<id>urn:sha1:b2a9f33616c806ae6e052520a8589113308f567c</id>
<content type='text'>
This has been a recurring ask and we had initially just made the change to
the cloud-init 2.0 codebase.  As the current thinking is we'll just
continue to enhance the current codebase, its desirable to relicense to
match what we'd intended as part of the 2.0 plan here.

- put a brief description of license in LICENSE file
- put full license versions in LICENSE-GPLv3 and LICENSE-Apache2.0
- simplify the per-file header to reference LICENSE
- tox: ignore H102 (Apache License Header check)

Add license header to files that ship.
Reformat headers, make sure everything has vi: at end of file.

Non-shipping files do not need the copyright header,
but at the moment tests/ have it.
</content>
</entry>
<entry>
<title>run flake8 instead of pyflakes in tox.  expect tests/ to pass flake8.</title>
<updated>2016-05-12T20:43:11+00:00</updated>
<author>
<name>Scott Moser</name>
<email>smoser@ubuntu.com</email>
</author>
<published>2016-05-12T20:43:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=4ba4df2f00ab1763920280f76e2b4497898858af'/>
<id>urn:sha1:4ba4df2f00ab1763920280f76e2b4497898858af</id>
<content type='text'>
</content>
</entry>
</feed>
