<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-cloud-init.git/cloudinit/net/tests/test_network_state.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>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/marekm72/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 set-name/interface DNS bug (#1058)</title>
<updated>2021-10-08T17:49:58+00:00</updated>
<author>
<name>Andrew Kutz</name>
<email>101085+akutz@users.noreply.github.com</email>
</author>
<published>2021-10-08T17:49:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=ca0da042e73d1cf078435befa02a6e09d004b62d'/>
<id>urn:sha1:ca0da042e73d1cf078435befa02a6e09d004b62d</id>
<content type='text'>
This patch addresses an issue caused when the v2 network config
directive "set-name" was used in conjunction with interface-
specific DNS settings. The patch adds a test to validate the fix.

For more information please see bug 1946493 as well as the issue
https://github.com/kubernetes-sigs/image-builder/issues/712.

LP: #1946493</content>
</entry>
<entry>
<title>Add new network activators to bring up interfaces (#919)</title>
<updated>2021-07-01T19:43:07+00:00</updated>
<author>
<name>James Falcon</name>
<email>therealfalcon@gmail.com</email>
</author>
<published>2021-07-01T19:43:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=81299de5fe3b6e491a965a6ebef66c6b8bf2c037'/>
<id>urn:sha1:81299de5fe3b6e491a965a6ebef66c6b8bf2c037</id>
<content type='text'>
Currently _bring_up_interfaces() is a no-op for any distro using
renderers. We need to be able to support bringing up a single
interfaces, a list of interfaces, and all interfaces. This should be
independent of the renderers, as the network config is often
generated independent of the mechanism used to apply it.

Additionally, I included a refactor to remove
"_supported_write_network_config". We had a confusing call chain of
apply_network_config-&gt;_write_network_config-&gt;_supported_write_network_config.
The last two have been combined.</content>
</entry>
<entry>
<title>Fix DNS in NetworkState (SC-133) (#923)</title>
<updated>2021-06-17T21:44:55+00:00</updated>
<author>
<name>James Falcon</name>
<email>TheRealFalcon@users.noreply.github.com</email>
</author>
<published>2021-06-17T21:44:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=abd2da5777195e7e432b0d53a3f7f29d071dd50e'/>
<id>urn:sha1:abd2da5777195e7e432b0d53a3f7f29d071dd50e</id>
<content type='text'>
v1 network config currently has no concept of interface-specific DNS,
which is required for certain renderers. To fix this, added an
optional 'interface' key on the v1 nameserver definition. If
specified, it makes the DNS settings specific to the interface.
Otherwise, it will be defined as global DNS as it always has.

Additionally, DNS for v2 wasn't being recognized correctly. For DNS
defined on a particular interface, these settings now also go into the
global DNS settings as they were intended.</content>
</entry>
<entry>
<title>net: ignore 'renderer' key in netplan config (#306)</title>
<updated>2020-04-03T17:58:08+00:00</updated>
<author>
<name>Ryan Harper</name>
<email>ryan.harper@canonical.com</email>
</author>
<published>2020-04-03T17:58:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=09fea85fd1f6fd944f4cdd8b97e283090178ae88'/>
<id>urn:sha1:09fea85fd1f6fd944f4cdd8b97e283090178ae88</id>
<content type='text'>
LP: #1870421</content>
</entry>
<entry>
<title>Replace mock library with unittest.mock (#186)</title>
<updated>2020-01-29T21:55:39+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-01-29T21:55:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=5f8f85bb38cc972d3d2c705a1ec73db3f690f323'/>
<id>urn:sha1:5f8f85bb38cc972d3d2c705a1ec73db3f690f323</id>
<content type='text'>
* cloudinit: replace "import mock" with "from unittest import mock"

* test-requirements.txt: drop mock

Co-authored-by: Chad Smith &lt;chad.smith@canonical.com&gt;
</content>
</entry>
<entry>
<title>network_state: handle empty v1 config (#45)</title>
<updated>2019-12-07T04:11:12+00:00</updated>
<author>
<name>Ryan Harper</name>
<email>ryan.harper@canonical.com</email>
</author>
<published>2019-12-07T04:11:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=34ec440c1ad61c23c34b46f1798813d0f3ada952'/>
<id>urn:sha1:34ec440c1ad61c23c34b46f1798813d0f3ada952</id>
<content type='text'>
Sending a valid but empty v1 network config resulted in a
stacktrace during execution.  Update the network_state
parse path to specific check if the 'config' key is None
(not present) versus being present but explicitly empty.
Also add some network_state unittests.

LP: #1852496</content>
</entry>
</feed>
