~wesley-wiedenmeier/cloud-init:integration-testing-docs

Last commit made on 2017-03-19
Get this branch:
git clone -b integration-testing-docs https://git.launchpad.net/~wesley-wiedenmeier/cloud-init
Only Wesley Wiedenmeier can upload to this branch. If you are Wesley Wiedenmeier please log in for upload directions.

Branch merges

Branch information

Name:
integration-testing-docs
Repository:
lp:~wesley-wiedenmeier/cloud-init

Recent commits

76bd57e... by Wesley Wiedenmeier

Integration Testing: Updated documentation

Added on information about the built in testcase creation helper and minor
additional features that may be useful for users.

7918b5c... by Wesley Wiedenmeier

Integration Testing: improve code to allow additional error codes in execute

 - Old behavior was to allow execute to ignore any return code from an
   in-target command with ignore_errors
 - Replace this with a list of acceptable return codes similar to util.subp
   which allows better control over command execution

c931e06... by Wesley Wiedenmeier

Integration Testing: remove citest_old_pylxd tox environment

 - pylxd 2.1.3 does not allow error checking during setup as it does nto return
   command exit code
 - remove the tox env for running integration tests using pylxd 2.1.3 and keep
   default environment using 2.2.3

bff4e11... by Wesley Wiedenmeier

Integration Testing: Cache lxd base images for cloud_tests

 - Cache lxd images cloud-test runs to avoid downloading images multiple times
 - Modified versions of images will still be removed, only base image kept
 - Image config option 'cache_base_image' controls this behavior
 - Enabled by default for all releases on lxd

fe0925c... by Wesley Wiedenmeier

Integration Testing: Enable pylxd 2.2.x

 - Allow using pylxd 2.2.x or pylxd 2.1.x in LXDInstance
   - handle .execute() return for either version
   - assume exit_code of 0 if pylxd 2.1.x as exit code is not returned
 - Switched citest tox env to pylxd 2.2.3
   - citest env using pylxd 2.1.3 still available as citest_old_pylxd
   - using pylxd 2.2.x enables detecting if setup commands failed and
     additional error handling
   - pylxd 2.2.3 includes fix for https://github.com/lxc/pylxd/issues/209
     which had prevented using pylxd 2.2.x previously

6aec255... by Wesley Wiedenmeier

Integration Testing: Allow image config to override setup_image options

 - Add setup_overrides to config to allow args to be overridden during image
   setup and add upgrade: true by default for lxd images
 - Add setup_overrides property to images
 - Add util.update_args() to apply overrides to args
 - Use a copy of args during setup_image and update copy with overrides

ab3e4f0... by Wesley Wiedenmeier

Integration Testing: Update release config

 - Re-order release config entries by distro and age
 - Clean up formatting in release config
 - Add additional releases:
   - ubuntu precise
   - debian jessie
 - Enable releases:
   - debian stretch
   - debian jessie
   - centos 7

7cac4df... by Wesley Wiedenmeier

Integration Testing: Update lxd image templates if necessary

 - some images come with lxd image metadata that does not provide nocloud seed
 - add image export and import functionality to LXDImage
 - fix this by exporting image, extracting metadata, adding new template
   scripts, then importing as new image
 - allows use of linuxcontainers.org images, which are available for distros
   other than ubuntu

5952da7... by Wesley Wiedenmeier

Integration Testing: Clean up and improve instance boot and execute

 - Improve instance.run_script():
   - return full (out, err, exit) tuple instead of just the stdout,
     allowing additional error checking
   - clean up tempfile after script has been run
   - generate tempfile names using 'mktemp' to avoid possible name conflicts
 - Refactor code to wait for the system to boot
   - use 'system_ready_script' from image config rather than hardcoded script
   - poll for in the instance rather than on the host to avoid excessive calls
     to execute()
   - check for the system to boot and cloud-init to complete separately,
     allowing images with cloud-init not installed to be booted by setup_image
   - execute ready script commands directly in loop, instead of writing tempfile
   - use .execute() instead of .run_script() to avoid file writes

6aac3df... by Wesley Wiedenmeier

Integration Testing: Refactored image configuration

 - Switched to new image config format to allow more image control options:
   - new image config format allows all options in image config to be
     overridden on a per platform and per image basis
   - default image config defined on a per platform basis with global default
   - releases have a default config and per platform overrides
   - override priority order (highest to lowest):
     - release's config per platform
     - release's default config
     - default config per platform
     - default config
 - Updated image config handling in config:
   - handle overrides for new image config format
   - clean up utility code for parsing release config
   - use cached config.ENABLED_DISTROS and config.ENABLED_PLATFORMS rather than
     scanning for enabled releases and platforms multiple times
   - check that requested config is enabled in cloud_tests.config by default
 - Update platforms to handle new image config
 - Pass image config and properties through all platform objects