~raharper/curtin/trunk.simple-bridge

  • Committer: Scott Moser
  • Author(s): Ryan Harper
  • Date: 2017-02-06 20:22:00 UTC
  • mfrom: (432.2.15 trunk.lp1635560)
  • Revision ID: smoser@ubuntu.com-20170206202200-qqfmooorwxo7ed0a
content decoding in load_file, apply_net raise exception on errors

This patch series fixes two issues. First, subcommands of the apply_net
command were exiting non-zero but we failed to raise and exception
which let curtin hide an error. We've modified apply_net to re-raise
the exception when it occurs. Additionally update vmtest to look for
stack-traces in the installation log and mark a test failed if it
detects one; this should prevent future cases from re-occurring.

The second error is when loading a file with and encoding, load_file
did not handle this case. Merge in a version of load_file from
cloud-init which already handles this case. Introduce new
unittests to validate the function as it touches some block related
code where we read partition data directly.

Finally, the mock_open feature of unittest.mock only supports
binary data in version 2.0.0 or newer, so skip this unittest on
systems without a new-enough mock; note this does not affect
the function of the code on the same release, only the unittest.
Filename Latest Rev Last Changed Committer Comment Size
..
unittests 8 10 years ago Scott Moser make test (with 1 test) Diff
vmtests 207.1.128 8 years ago Wesley Wiedenmeier Started working on support for testing by performi Diff