<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-cloud-init.git/tests/integration_tests/instances.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>2022-02-07T14:46:16+00:00</updated>
<entry>
<title>tests: do not check instance.pull_file().ok() (#1246)</title>
<updated>2022-02-07T14:46:16+00:00</updated>
<author>
<name>Chad Smith</name>
<email>chad.smith@canonical.com</email>
</author>
<published>2022-02-07T14:46:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=a804c108f51c806f1aa91a127433fcc3d8f8a78f'/>
<id>urn:sha1:a804c108f51c806f1aa91a127433fcc3d8f8a78f</id>
<content type='text'>
Test pycloudlib's BaseInstance.pull_file doesn't return a Result
object. So we can't call ok() on the response in integration tests.

Leave the try/except handling as pull_file will raise an
IOError if there is an error connecting via paramiko's sftp.get.</content>
</entry>
<entry>
<title>integration: do not LXD bind mount /etc/cloud/cloud.cfg.d (#1234)</title>
<updated>2022-02-03T04:38:56+00:00</updated>
<author>
<name>Chad Smith</name>
<email>chad.smith@canonical.com</email>
</author>
<published>2022-02-03T04:38:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=6ed3c5dfcd9392784d2199224ac7d28d1abfdf7b'/>
<id>urn:sha1:6ed3c5dfcd9392784d2199224ac7d28d1abfdf7b</id>
<content type='text'>
Since lxc bind mounts will be read-only as nobody:nogroup
we don't want to bind mount /etc/cloud/cloud.cfg.d into the
instance because some tests add artifacts to /etc/cloud/cloud.cfg.d.

Also make LXD push_file pull_file methods assert that the
file transfer was a success, otherwise we miss the root-cause
for test failures.

This resulted in failed Jenkins runs in test_lxd_discovery with a
symptom of NoCloud being detected instead of LXD datasource.
The root-case was that instance.file_push failed due to permission
errors for root on the bind mounted /etc/cloud/cloud.cfg.d.

Also bump pycloudlib commitish to get Azure Jammy image support.</content>
</entry>
<entry>
<title>Integration testing docs and refactor (#1231)</title>
<updated>2022-02-03T03:14:52+00:00</updated>
<author>
<name>James Falcon</name>
<email>james.falcon@canonical.com</email>
</author>
<published>2022-02-03T03:14:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=b64b7d8ceb0e7bdb7cc9839c238798622c5b9682'/>
<id>urn:sha1:b64b7d8ceb0e7bdb7cc9839c238798622c5b9682</id>
<content type='text'>
* Include CI and Fixtures sections in integration test docs
* Incorporate additional variable annotations
* Remove unnecessary IntegrationInstance subclasses
* Move setup_image teardown into its fixture</content>
</entry>
<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>Integration test upgrades for the 21.3-1 SRU (#1001)</title>
<updated>2021-09-15T15:44:26+00:00</updated>
<author>
<name>James Falcon</name>
<email>therealfalcon@gmail.com</email>
</author>
<published>2021-09-15T15:44:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=023f97d4e64c267b8bd809510b3fc75fcb9da688'/>
<id>urn:sha1:023f97d4e64c267b8bd809510b3fc75fcb9da688</id>
<content type='text'>
* Update test_combined.py to allow either valid LXD subplatform
* Split jinja templated tests into separate module as they can be more
  fragile
* Move checks for warnings and tracebacks into dedicated utility
  function. This allows us to work around persistent and expected
  tracebacks/warnings on particular clouds.
* Update test_upgrade.py to allow either valid Azure datasource.
  /var/lib/waagent or a mounted device are both valid.
* Add specificity to test_ntp_servers.py
  Clouds will often specify their own ntp servers in the ntp
  configuration files, so make the tests manually specify their own.
* Account for additional keys on system in test_ssh_keysfiles.py
* Update tests to account for invalid cache
  test_user_events.py and test_version_change.py both have tests that
  assume we will have valid ds cache when rebooting.
  In test_user_events.py, subsequent boots should block applying
  network on boot if boot event is denied. However, if the cache is
  invalid, it is valid to apply networking config that boot.
  In test_version_change.py no cache found won't trigger the expected
  debug log. Additionally, the pickle used for that test on an older
  release triggered an unexpected issue that took a different error
  path.
* Ignore bionic in hotplug tests (LP: #1942247)
  On Bionic, we traceback when attempting to detect the hotplugged
  device in the updated metadata. This is because Bionic is
  specifically configured not to provide network metadata.
  See LP: #1942247 for more details.
* Fix date used in test_final_message.
  In test_final_message, we ensured the variable substitution works as
  expected. For $timestamp, we compared against the current date. It's
  possible for the host date to be massively different from the client
  date, so obtain date on client rather than host.
* Remove module success from lp1813396 test. Module may fail
  unrelatedly (in this case apt-get update is failing), but the test
  should still pass.
* Skip testing events if network is disabled
* Ensure we install expected version of cloud-init
  As part of test setup, we can install cloud-init from various
  sources, including PROPOSED, PPAs, etc. We were never checking that
  this install completes successfully, and on OCI, it wasn't
  completing successfully because of apt locking issues. Code has
  been updated to retry, and then fail loudly if we can't complete the
  install.
* Remove ubuntu-azure-fips metapkg which mandates FIPS-flavour kernel
  In test_lp1835584.py
* Update test_user_events.py to account for Azure behavior
  since Azure has a separate service to clear the pickled metadata
  every boot
* Change failure to warning in test_upgrade.py if initial boot errors
  If there's already a pre-existing cause for warnings or tracebacks,
  that shouldn't cause the new version to fail.
* Add retry to test_random_passwords_emitted_to_serial_console
  It's possible we haven't retrieved the entire log when the call returns,
  so retry a few times if the output isn't empty.</content>
</entry>
<entry>
<title>Fix `make style-check` errors (#1000)</title>
<updated>2021-09-01T14:23:55+00:00</updated>
<author>
<name>Shreenidhi Shedi</name>
<email>53473811+sshedi@users.noreply.github.com</email>
</author>
<published>2021-09-01T14:23:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=58c2de4c97de6cfa6edbf5319641f2ef71284895'/>
<id>urn:sha1:58c2de4c97de6cfa6edbf5319641f2ef71284895</id>
<content type='text'>
Using flake8 inplace of pyflakes
Renamed run-pyflakes -&gt; run-flake8
Changed target name to flake8 in Makefile

With pyflakes we can't suppress warnings/errors in few required places.
flake8 is flexible in that regard. Hence using flake8 seems to be a
better choice here.

flake8 does the job of pep8 anyway.
So, removed pep8 target from Makefile along with tools/run-pep8 script.

Included setup.py in flake8 checks</content>
</entry>
<entry>
<title>azure: case-insensitive UUID to avoid new IID during kernel upgrade (#798)</title>
<updated>2021-02-19T22:37:57+00:00</updated>
<author>
<name>Chad Smith</name>
<email>chad.smith@canonical.com</email>
</author>
<published>2021-02-19T22:37:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=66e2d42dd1b722dc8e59f4e5990cea54f81ccd2a'/>
<id>urn:sha1:66e2d42dd1b722dc8e59f4e5990cea54f81ccd2a</id>
<content type='text'>
Kernel's newer than 4.15 present /sys/dmi/id/product_uuid as a
lowercase value. Previously UUID was uppercase.

Azure datasource reads the product_uuid directly as their platform's
instance-id. This presents a problem if a kernel is either
upgraded or downgraded across the 4.15 kernel version boundary because
the case of the UUID will change, resulting in cloud-init seeing a
"new" instance id and re-running all modules.

Re-running cc_ssh in cloud-init deletes and regenerates ssh_host keys
on a system which can cause concern on long-running instances that
somethingnefarious has happened.

Also add:
- An integration test for this for Azure Bionic Ubuntu FIPS upgrading from
   a FIPS kernel with uppercase UUID to a lowercase UUID in linux-azure
- A new pytest.mark.sru_next to collect all integration tests related to our
   next SRU

LP: #1835584</content>
</entry>
<entry>
<title>integration_tests: add UPGRADE CloudInitSource (#812)</title>
<updated>2021-02-18T20:36:31+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2021-02-18T20:36:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=28d2d4b86ebde5261fbe3a3ffb28292b2bbdbd76'/>
<id>urn:sha1:28d2d4b86ebde5261fbe3a3ffb28292b2bbdbd76</id>
<content type='text'>
This allows out-of-date images to be brought up-to-date with the
archive, so that tests written against the latest cloud-init release
will pass.</content>
</entry>
<entry>
<title>Remove 'remove-raise-on-failure' calls from integration_tests (#788)</title>
<updated>2021-01-26T17:25:04+00:00</updated>
<author>
<name>James Falcon</name>
<email>TheRealFalcon@users.noreply.github.com</email>
</author>
<published>2021-01-26T17:25:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=a9c904dc6438c908cd5341312311dfbbb18c81d2'/>
<id>urn:sha1:a9c904dc6438c908cd5341312311dfbbb18c81d2</id>
<content type='text'>
pycloudlib no longer raises exceptions when cloud-init fails to start,
and the API has been updated accordingly. Changes have been made to
integration tests accordingly</content>
</entry>
<entry>
<title>Add upgrade integration test (#693)</title>
<updated>2020-12-07T18:02:08+00:00</updated>
<author>
<name>James Falcon</name>
<email>TheRealFalcon@users.noreply.github.com</email>
</author>
<published>2020-12-07T18:02:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=54e202a6480e48dbb8a72004f7a5003f7c4edfae'/>
<id>urn:sha1:54e202a6480e48dbb8a72004f7a5003f7c4edfae</id>
<content type='text'>
Add an integration test that roughly mimics many of the manual cloud
SRU tests. Also refactored some of the image setup code to make it
easier to use in non-fixture code.</content>
</entry>
</feed>
