summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2013-07-09merge from trunkScott Moser
2013-07-09re-enable test case because 1124384 is fixedScott Moser
2013-07-09add some unit tests, fix things found by doing soScott Moser
2013-07-08fix test_nocloud testcaseScott Moser
2013-05-13Fix how the 'dist' is incorrectly returned when patching the os functions.Joshua Harlow
2013-05-10Fixed merging capabilities.Scott Moser
Instead of previously having merging which was not backwards compatible with the 0.7.1 and prior methods this patch works to ensure said backwards compatible while at the same time making the new merging functionality work in a more customizable manner.
2013-05-10fix pylintScott Moser
2013-05-10fix pep8Scott Moser
2013-05-09Fix the cloud config merging so that it is backwards compat.Joshua Harlow
The new change for merging works well in the mergedict case but the default merging type for cloud config needs to reflect how yaml was loaded in bulk, which is the same as the replacing keys merging type that is now provided.
2013-05-071 more test that does some list appending.Joshua Harlow
2013-05-07A few more test files.Joshua Harlow
2013-05-04Add a set of randomized (seeded) dict tests.Joshua Harlow
2013-05-03A few pep8/pylint cleanups.Joshua Harlow
2013-05-03Rename the merge cc sample function name.Joshua Harlow
2013-05-03A few more tests + cleanings.Joshua Harlow
2013-05-03More merging adjustments.Joshua Harlow
Looks like this should be in pretty good shape and has passed some of the basic backwards compat. merging tests that I added.
2013-04-25fix testScott Moser
2013-04-23Add a bunch of new merging test files + runner.Joshua Harlow
2013-03-26compatibility fixes for Fedora and RHELGreg Padgett
This patch fixes issues in Fedora 18 (and upcoming RHEL 7) which are present due to their use of systemd: - store locale configuration in /etc/locale.conf - store hostname in /etc/hostname - use a symlink for /etc/localtime (prior code would set the timezone but corrupt data in /usr/share/zoneinfo due to presence of symlink) It also contains fixes for issues unrelated to systemd adoption: - explicitly scan /dev/sr0 with blkid in order to get the optical drive in the blkid cache. This prevents an issue on systems running 2.6 kernels (such as RHEL 6) in which config disks on some devices won't be detected unless the device has previously been queried. (For reference, see https://patchwork.kernel.org/patch/1770241/) - append a newline when rewriting sysconfig files, as this is customary text configuration file formatting and is expected by some parsers (such as the ifcfg-rh plugin for NetworkManager)
2013-03-19merge from trunk rev 800Scott Moser
2013-03-19pylint fixesScott Moser
a.) appease pylint on raring, as it doesn't like subprocess pylint: 0.26.0-1ubuntu1 This is mentioned in comments at http://www.logilab.org/ticket/46273 b.) tests/unittests/test_util.py: the mountinfo lines are longer than 80 chars. Just disable long lines complaints for this file.
2013-03-19merge from trunk at revno 799Scott Moser
2013-03-12refactor get_mount_info and add testsBlair Zajac
1) Refactor util.get_mount_info() to facilitate unit testing. 2) Add unit tests for /proc/$$/mountinfo parsing.
2013-03-12skip unit test due to LP: #1124384Scott Moser
This re-applies the change in revno 785. A merge made this test pass rather than skip, but I'd rather have it skip for now, as we really hope to have the upstart bug fixed.
2013-03-10util.parse_mount_info(): add unit tests.Blair Zajac
2013-03-08Enable the merging.txt to be in .rst format for public viewingJoshua Harlow
2013-03-07more pep8/pylint. all clean nowScott Moser
2013-03-07fix pep8 and pylintScott Moser
2013-03-07merge from trunkScott Moser
2013-03-07pep8Scott Moser
2013-03-07fix a pylint complaint in test_handler_growpartScott Moser
E1103: 81,44:TestWriteFile.test_basic_usage: Instance of 'Bunch' has no 'st_mode' member (but some types could not be inferred) so, if it wants st_mode, for now just give it one.
2013-03-07pep8 and pylint fixesScott Moser
2013-03-06Continue working on merging code.Joshua Harlow
2013-03-05Add in a bunch of changes and tests.Joshua Harlow
2013-03-05pep8, pylint, make resize_devices return more usefulScott Moser
resize_devices now contains what action occurred for each entry.
2013-03-05remove 'log' passing. call growpart with --dry-run first.Scott Moser
growrun --dry-run will exit 1 if it wouldn't do anything. so call it, check for '1' and if no change, then just return.
2013-03-05change default (no 'growpart' in config) to use 'auto' and '/'Scott Moser
2013-03-04test of resize, a couple small fixesScott Moser
2013-03-04add the unit test, fix a few issuesScott Moser
2013-03-01change parser.parse 'default_opts' to 'options'Scott Moser
Now, parser.parse specifies options that override any options found, rather than just being default options. There could still potentially be a user for default_options, but since we're not using them anywhere, I've dropped it. The difference is that in setting up the root user, we're now insisting that all keys that go in there have the key_prefix, even if the key content had other options. I think this is actually the commit that fixes LP: #1136343.
2013-03-01add some unit tests, fix an issue or twoScott Moser
* drop the parsing of options into csv, as we were only exploding them back. That can only result in error. Just do minimal parsing. * change the parsing of key lines to: if entry is valid: * use it else try taking off options: if good, use it else fail
2013-03-01skip unit test due to LP: #1124384Scott Moser
2013-02-23Get tests working and further adjustments.harlowja
2013-02-07more test cases for nocloud including one for config seedScott Moser
2013-02-07add test_nocloud unit tests, fix one issue foundScott Moser
2013-01-24Merge the old user style with the distro provided config.harlowja
When the old user: style entry is found, don't forget that we need to use the distro settings that are provided but override the name with the new name, this is now accomplished by merging them together in the correct order (using the standard cloud-init merging algo).
2013-01-18Adjust how the legacy user: XYZ config alters the normalized user listJoshua Harlow
Previously if a legacy user: XYZ entry was found, XYZ would not automatically be promoted to the default user but would instead just be added on as a new entry to the normalized user list. It appears the behavior that is wanted is for the XYZ entry to be added on as the default user (thus overriding a distro provided default user), which better matches how the code previous worked. LP: #1100920
2013-01-16DataSourceConfigDrive: consider CD rom as valid config-drive source.Scott Moser
previously, there was an attempt in the config drive source to limit the source device to a "full block device" rather than a partition. This was done by a simplistic approach of checking that the last character of the name was not a number. That was filtering out CD-rom devices (sr0). Now, we have a bit more sophisticated approach to that same problem. We filter out block devices that have a 'partition' entry in /sys/class/block/DEVICE_NAME/partition . LP: #1100545
2013-01-10Add a context manager function in test helpers.harlowja
This function can be used to ensure that mocker objects are restored and verified during usage if exceptions are thrown while the mock object is being used. Ensure it is used in the config drive test when multiple mock objects are being created and restored. LP: #1098430
2012-12-17tell upstart to reload configuration after writing an upstart jobScott Moser
Invoking 'initctl reload-configuration' is only required if inotify does not work. overlayroot does not support inotify. So, we just call initctl always, which wont hurt anything. LP: #1080841