Age | Commit message (Collapse) | Author |
|
Applied Black and isort, fixed any linting issues, updated tox.ini
and CI.
|
|
Also simplify a path and fix a spelling error while in the file
|
|
Integration test runs get unique log directories at
/tmp/cloud_init_test_logs/$DATE_TIME. Make
/tmp/cloud_init_test_logs/last always point to the most recent
integration test directory.
|
|
In #856 we added the ability to use partprobe instead of blockdev for
reading partitions. Test that partprobe succeeds where blockdev fails.
Also add a mechanism to our integration tests to allow a callable to be
called between `lxc init` and `lxc start`
|
|
The latest pycloudlib now launches official Ubuntu cloud images for
xenial, meaning that `lxc exec` no longer works against them. This
commit includes handling for tests which are affected by this change;
further details and reasoning in the included comment.
|
|
|
|
pycloudlib has modified the way LXD executes tests
(https://github.com/canonical/pycloudlib/pull/114): it will always use
SSH to access them by default, instead of using `lxc exec`. This
behaviour is transparent for them majority of cloud-init's integration
tests, but some currently depend on using `lxc exec` to access instances
with (intentionally) broken networking: obviously these are not
accessible via SSH.
pycloudlib retains support for switching an instance to use `lxc exec`.
This commit introduces the `lxd_use_exec` mark, which tests can use to
indicate to the integration testing framework that they should be so
switched, and applies it to all applicable tests.
|
|
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.
|
|
This gives us more detailed integration testing output by default.
This will make debugging failures reported by users/developers easier to
debug, as it removes the need for an initial round-trip to get the
output we need for debugging. It will also make debugging intermittent
failures easier: there will definitely be log output from runs which
exhibit the intermittent failure.
|
|
This makes it easier to find the failure logs when you're running a
bunch of similar tests in parallel.
|
|
This fixes up an issue introduced in
54e202a6480e48dbb8a72004f7a5003f7c4edfae.
|
|
integration_tests: add test for LP: #1898997
This introduces the `lxd_config_dict` mark, used to specify a
free-form configuration dict to LXD for tests which only run there; and
the `not_xenial` and `not_bionic` marks, used to skip tests on
xenial/bionic via a basic release skipping mechanism.
This also bumps the pycloudlib commit we depend upon, as
the latest commit includes the changes required for LXD network config
to work.
(The `lxd_config_dict` change further complicated `_client`, so a minor
refactoring is applied.)
|
|
Also introduce the `unstable` mark, to allow us to land tests which
run inconsistently (such as this one).
|
|
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.
|
|
This introduces an optional, more complex OS_IMAGE format (`<image
id>::<os>::<release>`) which allows the specification of the OS/OS
release which the given image ID corresponds to. This information is
used to skip tests which do not apply to the image.
This commit is comprised of the following discrete changes:
* introduce the IntegrationImage class, to handle parsing and storing
the new OS_IMAGE format
* support inferring the OS and OS release of Ubuntu series, so that we
can continue to set OS_IMAGE to just a series name and have test
skipping work
* add documentation on Image Selection to integration_tests.rst
* introduce the actual skipping behaviour based on OS marks
* apply the `ubuntu` mark to all tests that should be skipped on
non-Ubuntu operating systems
|
|
Integration tests have been leaving behind snapshot images, so now we
clean them up. Also, in testing, found that in Azure, deleting a
resource group will automatically delete the instance, so if
KEEP_INSTANCE is True, we no longer delete the resource group.
Co-authored-by: Daniel Watkins <oddbloke@ubuntu.com>
|
|
During teardown of every cloud instance, run 'cloud-init collect-logs',
then transfer and unpack locally. Two new integration settings have
been added to specify when to perform this action (ALWAYS,
ON_ERROR, NEVER), and where to store these logs.
|
|
|
|
See #585
|
|
IMAGE_SOURCE = 'IN_PLACE' wasn't working previously. Replaced
LXD launch with an init, then mount, then start.
|
|
|
|
* integration_tests: fix passing launch_kwargs to session_cloud.launch
* integration_tests: log the launch_kwargs before launching instances
* integration_tests: add support for specifying instance name for tests
Co-authored-by: Rick Harding <rharding@mitechie.com>
|
|
* Separated IntegrationClient into separate cloud and instance abstractions.
This makes it easier to control the lifetime of the pycloudlib's cloud
and instance abstractions separately.
* Created new cloud-specific subclasses accordingly
* Moved platform parsing and initialization code into its own file
* Created new session-wide autorun fixture to automatically initialize
and destroy the dynamic cloud
|
|
|
|
|
|
|