tests: fix apt_configure_primary to be more flexible
Commit d3e803ad316e6796e5d83e7e8f8f4f7224b92df9 added deb-src comments to
the cloud-init apt templates. This doubled the number of matching entries
seen in /etc/apt/sources.list in apt_configure_primary integration test.
This test was really asserting that GaTech urls were present in
/etc//apt/sources.list instead of archive.ubuntu.com. Fix the test to be a
bit more flexible in case cloud-init changes its bas apt template again.
Ubuntu: update sources.list to comment out deb-src entries.
Other installation modes began to comment out the deb-src lines in
/etc/apt/sources.list sometime in 16.04 time frame.
This makes the cloud-init rendered sources.list the same as that
currently present in the lxd images.
The changes here are:
a.) comment out all 'deb-src' lines.
b.) move security to the bottom of the file.
c.) trim trailing white space from 3 comment lines.
tests: allow skipping an entire cloud_test without running.
Individual skipTest or setUp SkipTest will still launch the instance.
This allows us to stop the running of the instance so we don't
waste cycles or boot systems that are known to fail.
Also replace remaining unittest usage in tests/cloud_tests/
with unittest2.
Skip lxd tests on cosmic for two reasons:
a.) bug 1795036 - 'lxd init' fails on cosmic kernel.
b.) apt install lxd installs via snap which can be slow
as that will download core snap and lxd.
cii-tests: use unittest2.SkipTest in ntp_chrony due to new deps
Git commitish fc4b966ba928b30b1c586407e752e0b51b1031e8 changed integration
test dependencies from unittest to unittest2. Use unittest2.SkipTest in
test_chrony to avoid causing tracebacks.
tests: fix ec2 integration tests. process meta_data instead of meta-data
Commitish c7555762f3a30190ce7726b4d013bc3e83c7e4b6 changed the variable
names in instance-data.json from hyphenated to underscore delimited. In
the shuffle, meta-data -> meta_data was missed.