<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-cloud-init.git/tests/unittests/test_handler/test_handler_puppet.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-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: add get_cloud function (SC-461) (#1038)</title>
<updated>2021-10-16T00:53:42+00:00</updated>
<author>
<name>James Falcon</name>
<email>james.falcon@canonical.com</email>
</author>
<published>2021-10-16T00:53:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=a9501251aadf6d30192f7bd7debeabc9c3e29420'/>
<id>urn:sha1:a9501251aadf6d30192f7bd7debeabc9c3e29420</id>
<content type='text'>
Also added supporting distro/datasource classes and updated tests
that have a `get_cloud` call.</content>
</entry>
<entry>
<title>puppet config: add the start_agent option (#1002)</title>
<updated>2021-09-01T14:50:37+00:00</updated>
<author>
<name>Andrew Bogott</name>
<email>Andrewbogott@gmail.com</email>
</author>
<published>2021-09-01T14:50:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=db72c841c2ec0d94d366df7fa623e82e91e2201c'/>
<id>urn:sha1:db72c841c2ec0d94d366df7fa623e82e91e2201c</id>
<content type='text'>
The current code starts the puppet agent and also sets autostart
in all cases. This conflicts with a common pattern where puppet
itself manages the agent and autostart state.

For example, in my deploy puppet disables the puppet agent
and replaces it with a cron. This causes various races
both within this cloud-init unit and within puppet itself
while cloud-init and puppet fight over whether or not
to enable the service.</content>
</entry>
<entry>
<title>Replace broken httpretty tests with mock (SC-324) (#973)</title>
<updated>2021-08-13T01:06:28+00:00</updated>
<author>
<name>James Falcon</name>
<email>therealfalcon@gmail.com</email>
</author>
<published>2021-08-13T01:06:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=1c3b10b58768ec4c70384f4a7af7ce956518fe7c'/>
<id>urn:sha1:1c3b10b58768ec4c70384f4a7af7ce956518fe7c</id>
<content type='text'>
* Replace broken httpretty tests with mock

Certain versions of python/httpretty don't work correctly using https
URIs. #960 recently added httpretty tests using https. This commit
replaces the httpretty tests that were failing on https with mocks of
readurl instead.</content>
</entry>
<entry>
<title>cc_puppet: support AIO installations and more (#960)</title>
<updated>2021-08-10T15:14:23+00:00</updated>
<author>
<name>Gabriel Nagy</name>
<email>gabrielnagy@me.com</email>
</author>
<published>2021-08-10T15:14:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=9893dfcd2f0be92197d707236cbd44cb7452364d'/>
<id>urn:sha1:9893dfcd2f0be92197d707236cbd44cb7452364d</id>
<content type='text'>
- update the puppet module to support AIO installations by setting
  `install_type` to `aio`
- make the install collection configurable through the `collection`
  parameter; by default the rolling `puppet` collection will be used,
  which installs the latest version)
- when `install_type` is `aio`, puppetlabs repos will be purged after
  installation; set `cleanup` to `False` to prevent this
- AIO installations are performed by downloading and executing a shell
  script; the URL for this script can be overridden using the
  `aio_install_url` parameter
- make it possible to run puppet agent after installation/configuration
  via the `exec` key
- by default, puppet agent will run with the `--test` argument; this can
  be overridden via the `exec_args` key</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/vyos/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>test: fix all flake8 E121 and E123 errors (#404)</title>
<updated>2020-06-02T16:06:07+00:00</updated>
<author>
<name>Joshua Powers</name>
<email>josh.powers@canonical.com</email>
</author>
<published>2020-06-02T16:06:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=d53921ea3396c8301c65cad3abf04b4542d4b7a0'/>
<id>urn:sha1:d53921ea3396c8301c65cad3abf04b4542d4b7a0</id>
<content type='text'>
This fixes issues with closing brackets not matching the opening
bracket's line and continuation line under-idented for hanging indent.</content>
</entry>
<entry>
<title>cloudinit/tests: remove unneeded with_logs configuration (#263)</title>
<updated>2020-03-19T16:01:15+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-03-19T16:01:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=ade47866aa2f81ab0f3baabbb1fc1e484abdb741'/>
<id>urn:sha1:ade47866aa2f81ab0f3baabbb1fc1e484abdb741</id>
<content type='text'>
These classes don't use `self.logs` anywhere in their body, so we can
remove the `with_logs = True` setting from them.

These instances were found using astpath[0], with the following
invocation:

  astpath "//Name[@id='with_logs' and not(ancestor::ClassDef//Attribute[@attr='logs'])]"

[0] https://github.com/hchasestevens/astpath</content>
</entry>
<entry>
<title>cc_puppet: Implement csr_attributes.yaml support</title>
<updated>2019-10-31T15:01:10+00:00</updated>
<author>
<name>Matthias Baur</name>
<email>m.baur@syseleven.de</email>
</author>
<published>2019-10-31T15:01:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=d3e71b5e843edf73eb7da511a032d987e314bd69'/>
<id>urn:sha1:d3e71b5e843edf73eb7da511a032d987e314bd69</id>
<content type='text'>
This change adds two new parameters:
* csr_attributes
* csr_attributes_path

Those parameters allow to configure the content of the
csr_attributes.yaml file.

See https://puppet.com/docs/puppet/latest/config_file_csr_attributes.html
</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>
</feed>
