summaryrefslogtreecommitdiff
path: root/tests/integration_tests
AgeCommit message (Collapse)Author
2021-01-26Revert integration test associated with reverted #586 (#784)James Falcon
2021-01-26Remove 'remove-raise-on-failure' calls from integration_tests (#788)James Falcon
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
2021-01-22Use more cloud defaults in integration tests (#757)James Falcon
Stop requiring compartment_id for OCI and project_id for GCE since they can now be inferred in pycloudlib.
2021-01-19integration_tests: log image serial if available (#772)Daniel Watkins
Ubuntu cloud images ship /etc/cloud/build.info which includes a line with the build serial used to identify the image: serial: 20210108 This is valuable information when verifying Ubuntu issues (to confirm that testing is happening against the expected image), but is also useful when debugging test failures: manifests of all packages in (the base) images can be found at http://cloud-images.ubuntu.com/
2021-01-13net: Fix static routes to host in eni renderer (#668)Pavel Abalikhin
Route '-net' parameter is incompatible with /32 IPv4 addresses so we have to use '-host' in that case.
2021-01-13test_upgrade: add some missing commas (#769)Daniel Watkins
2021-01-13cc_seed_random: update documentation and fix integration test (#771)Daniel Watkins
The documentation did not mention that the given data may not be the exact string written: the cloud's random data may be added to it. Additionally, the documentation of the command key was incorrect. test_seed_random_data was updated to check that the given data is a prefix of the written data, to match cloud-init's expected (and, now, documented) behaviour. LP: #1911227
2021-01-12Fix test gh-632 test to only run on NoCloud (#770)James Falcon
LP: #1911230
2021-01-12integration_tests: add integration test for LP: #1910835 (#761)Daniel Watkins
2021-01-08integration_tests: log cloud-init version in SUT (#758)Daniel Watkins
2021-01-06integration_tests: add SSH key selection settings (#754)Daniel Watkins
This introduces PUBLIC_SSH_KEY, to configure what public SSH key should be used to access systems under test, and KEYPAIR_NAME, to configure the name used in clouds for that SSH key (or the default SSH key, in PUBLIC_SSH_KEY's absence).
2021-01-04integration_tests: port ca_certs tests from cloud_tests (#732)Daniel Watkins
2020-12-18integration_tests: set log-cli-level to INFO by default (#737)Daniel Watkins
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.
2020-12-18integration_tests: log the path we collect logs into (#733)Daniel Watkins
This makes it easier to find the failure logs when you're running a bunch of similar tests in parallel.
2020-12-17integration_tests: fix IN_PLACE CLOUD_INIT_SOURCE (#731)Daniel Watkins
This fixes up an issue introduced in 54e202a6480e48dbb8a72004f7a5003f7c4edfae.
2020-12-15integration_tests: restrict test_lxd_bridge appropriately (#730)Daniel Watkins
On xenial, the bridge test fails because xenial's LXD doesn't include the `network` subcommand. On bionic, the bridge test fails within containers, because LXD isn't able to manipulate the host kernel as it expects. (focal and later do run successfully in containers, but we don't have a good way of expressing that presently.)
2020-12-15Add integration tests for CLI functionality (#729)James Falcon
This currently covers functionality added in #575
2020-12-15Integration test for gh-626 (#728)James Falcon
Ensure if wakeonlan is specified in the network config that it is rendered in the /etc/network/interfaces or netplan config.
2020-12-15Some test_upgrade fixes (#726)James Falcon
- workaround pad.lv/1908287 for restarting instances - move wait param from launch_kwargs to launch call - remove name param as it's not universally supported - add platform to log names
2020-12-15Ensure overriding test vars with env vars works for booleans (#727)James Falcon
2020-12-15integration_tests: port lxd_bridge test from cloud_tests (#718)Daniel Watkins
2020-12-11Integration test for gh-632. (#725)James Falcon
Verify that if cloud-init is using DataSourceRbxCloud, there is no traceback if the metadata disk cannot be found.
2020-12-11Integration test for gh-671 (#724)James Falcon
Verify that on Azure that if a default user and password are specified through the Azure API that a change in the default password overwrites the old password
2020-12-10Integration test for LP: #1813396 and #669 (#719)James Falcon
Ensure gpg is called with --no-tty flag. Also, refactored the "ordered_items_in_text" to assert if the line is missing and provide a more useful error message.
2020-12-09integration_tests: add test for LP: #1898997 (#713)Daniel Watkins
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.)
2020-12-09Add integration test for power_state_change module (#717)James Falcon
Also introduce the `unstable` mark, to allow us to land tests which run inconsistently (such as this one).
2020-12-07Add upgrade integration test (#693)James Falcon
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.
2020-12-04Integration test for 570 (#712)James Falcon
Test that we can add optional vendor-data to the seedfrom file in a NoCloud environment. Also added the option to pass raise_on_cloudinit_failure through an instance restart so we get automatic failure checking when we need to manually reboot.
2020-12-04Add ability to keep snapshotted images in integration tests (#711)James Falcon
For SRU test development, every single time we start a new test run, we need to first install the PROPOSED version and create an image snapshot. Instead of automatically deleting a snapshot, add an integration setting to allow us to keep the snapshot. The end of the test run will log the image name which can then be used as the OS_IMAGE in subsequent test runs.
2020-12-03Integration test for pull #586 (#706)James Falcon
If a non-default AuthorizedKeysFile is specified in /etc/ssh/sshd_config, ensure we can still ssh as expected
2020-12-03integration_tests: introduce skipping of tests by OS (#702)Daniel Watkins
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
2020-12-03integration_tests: introduce IntegrationInstance.restart (#708)Daniel Watkins
This wraps pycloudlib's `BaseInstance.restart` and `BaseInstance.wait` to pass the same parameters as on launch, to avoid cloud-init failures on the _reboot_ raising an exception.
2020-12-02Add lxd-vm to list of valid integration test platforms (#705)James Falcon
2020-11-30Delete image snapshots created for integration tests (#682)James Falcon
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>
2020-11-26Parametrize ssh_keys_provided integration test (#700)lucasmoura
2020-11-26Drop use_sudo attribute on IntegrationInstance (#694)lucasmoura
pycloudlib will stop running commands as root by default on LXD. To align with that change and make the behavior consistent with other clouds we support, our LXD instances will now run the commands with sudo by default.
2020-11-24Collect logs from integration test runs (#675)James Falcon
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.
2020-11-23Ensure proper root permissions in integration tests (#664)James Falcon
Tests previously assumed that when executing commands and transferring files that user will have root permissions. This change updated integration testing infrastructure so that is true.
2020-11-23LXD VM support in integration tests (#678)James Falcon
2020-11-23Integration test for fallocate falling back to dd (#681)James Falcon
See #585
2020-11-20Support configuring SSH host certificates. (#660)Jonathan Lung
Existing config writes keys to /etc/ssh after deleting files matching a glob that includes certificate files. Since sshd looks for certificates in the same directory as the keys, a host certificate must be placed in this directory. This update enables the certificate's contents to be specified along with the keys. Co-authored-by: jonathan lung <lungj@heresjono.com> Co-authored-by: jonathan lung <jlung@kepler.space>
2020-11-20add integration test for LP: #1900837 (#679)Daniel Watkins
As the first test of this SRU cycle, this also introduces the sru_2020_11 mark to allow us to easily identify the set of tests generated for this SRU.
2020-11-19Make mount in place for tests work (#667)James Falcon
IMAGE_SOURCE = 'IN_PLACE' wasn't working previously. Replaced LXD launch with an init, then mount, then start.
2020-11-19integration_tests: restore emission of settings to log (#657)Daniel Watkins
2020-11-18only run a subset of integration tests in CI (#672)Daniel Watkins
This introduces the "ci" mark, used to indicate a test which should run as part of our CI integration testing run and the integration-tests-ci tox environment, which runs only those tests. Travis has been adjusted to use this tox environment. (All current module tests have been marked with the "ci" mark, but the one bug test that we have has not.)
2020-11-04Fix launch_kwargs bug in integration tests (#654)James Falcon
Integration test instance launch would previously fail if provided launch_kwargs is None
2020-11-02integration_tests: various launch improvements (#638)Daniel Watkins
* 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>
2020-11-02test_lp1886531: don't assume /etc/fstab exists (#639)Daniel Watkins
As the bug manifested because groovy doesn't ship /etc/fstab, we should not assume that /etc/fstab will be present for us to remove in our bootcmd. Co-authored-by: Rick Harding <rharding@mitechie.com>
2020-10-26refactor integration testing infrastructure (#610)James Falcon
* 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
2020-10-19Add more integration tests (#615)lucasmoura
Translate the following tests from `cloud_tests` to the new integration test framework: * test_runcmd.py * seed_random_data.py * set_hostname.py * set_hostname_fqdn.py * snap.py * ssh_auth_key_fingerprints_disable.py * ssh_auth_key_fingerprints_enable.py * ssh_import_id.py * ssh_keys_generate.py * ssh_keys_provided.py * timezone.py * write_files.py