summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
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
2012-12-01make sure no blank lines before cloud-init entry in ca-certificates.confScott Moser
when /etc/ca-certificates.conf is read by update-ca-certificates lines after a blank line get ignored. Here, ensure that there are no blank lines, and no duplicate entries for cloud-init are added. LP: #1077020
2012-11-20pep8 and pylintScott Moser
2012-11-14Cleanup the tests slightly.Joshua Harlow
2012-11-14Add the string sudoers rule test case as well.Joshua Harlow
2012-11-14Add a test to make sure this doesn't happen again.Joshua Harlow
2012-11-13Create a utility testcase class that fixes some of the 2.6 missing piecesJoshua Harlow
- Add a helper testcase class that can add additional features into the unit test class as we need for features that are useful to have which starts with features that are missing including assertIn and assertNotIn LP: #1078473
2012-11-13implement power_state with tests.Scott Moser
2012-11-13replace 'with self.assertRaises(Exception):' with different formScott Moser
I'm guessing that with self.assertRaises(Exception): something here is an acceptable form in a newer or older python. But my python (2.7.3-0ubuntu7) doesn't like it. Interestingly, python unittest doc says: | Changed in version 2.7: Added the ability to use assertRaises() as | a context manager.
2012-11-12Pylint and pep8 cleanups.Joshua Harlow
2012-11-12Rebased with HEAD and resolved conflicts.Joshua Harlow
2012-11-12test_handler_yum_add_repo: fix broken testScott Moser
2012-11-12config-drive-v2: support public keysScott Moser
This does a couple things: * separates out the 'normalize_public_keys' from the DataSource's get_public_ssh_keys * uses that from config-drive datasource * supports config drive v1 or v2 public-keys * adds a test. LP: #1077700
2012-11-10whitespace / indentation cleanupsScott Moser
These changes were pulled out of the previous merge (cc_yum_add_repo) as they were unrelated there. Re-applying them here.
2012-11-10add yum_add_repo configuration moduleScott Moser
Add in a configuration module that can write out the yum.repo format for those that want to hook into different repos for installing.
2012-11-101 pep8 and 1 pylint fixScott Moser
2012-11-10revert unrelated whitespace changes that creeped in.Scott Moser
2012-11-10sync with trunkScott Moser
2012-11-10Sudoers.d creation cleanups + tests.Joshua Harlow
2012-11-09Fix the merging of group configuration.Joshua Harlow