summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2015-01-26Trunk merged and ported.Barry Warsaw
2015-01-26Port the MAAS code to oauthlib.Barry Warsaw
2015-01-26Down to it.Barry Warsaw
2015-01-26* More str/bytes fixes.Barry Warsaw
* Temporarily skip the MAAS tests in py3 since they need to be ported to oauthlib.
2015-01-26More Python 3 test fixes.Barry Warsaw
2015-01-26More test repairs.Barry Warsaw
2015-01-22Low hanging Python 3 fruit.Barry Warsaw
2015-01-22Conversion from mocker to mock completed.Barry Warsaw
2015-01-22More conversions from mocker to mock.Barry Warsaw
2015-01-22More conversions from mocker to mock.Barry Warsaw
2015-01-22More test ports from mocker to mock.Barry Warsaw
2015-01-22Clean up.Barry Warsaw
2015-01-22Convert helpers.py and test_data.py from mocker to mock.Barry Warsaw
2015-01-22Use .addCleanup() instead of a .tearDown() where appropriate, although weBarry Warsaw
might have to rewrite this for Python 2.6. Disable Cepko tests (test_cs_util.py) since they are essentially worthless. Convert test_azure to unittest.mock.
2015-01-22merge from trunkScott Moser
2015-01-22Port test__init__.py to unittest.mock.Barry Warsaw
2015-01-21Largely merge lp:~harlowja/cloud-init/py2-3 albeit manually because it seemedBarry Warsaw
to be behind trunk. `tox -e py27` passes full test suite. Now to work on replacing mocker.
2015-01-21Use either syspath or dmidecode based on the availability.Ben Howard
2015-01-21More octal literal fixes.Barry Warsaw
2015-01-21Fix file modes to be Python 2/3 compatible.Barry Warsaw
2015-01-21Only install cheetah (and only run the cheetah templating test) when in PythonBarry Warsaw
2. Cheetah is not compatible with Python 3.
2015-01-14Drop reliance on dmidecode executable.Ben Howard
2015-01-14Use the short name for GCE hostnames per GCE's request (LP: #1383794).Ben Howard
2015-01-06remove the user-data-encoding from test meta-dataScott Moser
just so we don't come to rely on it being set to 'base64' or ''. rather the default case is that it wont be present at all.
2015-01-06merge from trunkScott Moser
2015-01-06tools/run-pep8: remove leading ',' fed to --ignoreScott Moser
--ignore was being called with ',E121,E...' rather than 'E121,E...'. that resulted in odd behavior, missing the pep8 errors that are fixed here.
2015-01-06pep8Scott Moser
2014-12-19add user-data encoding support for gceWayne Witzel III
2014-11-24Use assertNotEqual which exists on python2.6Joshua Harlow
Instead of using assertGreater which is new on python2.7 just use assertNotEqual which does exist on python2.6 to perform the same/similar operation. This makes the unittest not break on python2.6
2014-11-24IPv6 support for rhel distroJoshua Harlow
When the ubuntu networking info file has ipv6 addresses inside it we need to make sure that we parse that information out and place it (at least) in the rhel network configuration writing. In later patches the other distros that use this parsed network configuration will likely also need to be updated (ubuntu and debian already should function as expected with regard to ipv6 support).
2014-11-24Updated unittestsShraddha Pandhe
+ Scenario with multiple NICs
2014-11-21Pretty up the debug moduleJoshua Harlow
Previously the usage of the yaml_dumps module was causing any python unicode key and value to show up as: 'item': !!python/unicode "some string" This was not very pretty... Fix this by using safe_dumps (which is also a good thing to use and allow_unicode=True). Also create a tiny helper function in the cc_debug module that does not include the yaml start and end footers (since this module has its own footers and headers). Also includes a basic sanity test for this module.
2014-11-21Fix parse_ssh_config failing in ssh_util.pyJoshua Harlow
This fix handles '=' as a delimiter in SSH config and adds appropriate test methods to ensure this functionality continues to work correctly.
2014-11-21Increase the robustness/configurability of the chef module...Joshua Harlow
Add the following adjustments to the chef template and module: - Make it so that the chef directories can be provided (defaults to the existing directories) - Make the params much more configurable, and if a parameter is provided in the chef configuration it will override existing template parameters. - Make the template skip lines if the values are None in the configuration so that template lines can be removed if/when this is desirable. - Allow the firstboot json path to be configurable (defaults to the existing location). - Adds a basic set of tests to ensure that good things are happening. - Make a helper function to tell if already installed. - Have the install routine not run chef after installed but have it instead return a result to tell the caller to run the chef program once completed. - Use the generated_by() utility function to give the ruby template a better header comment. - Set special parameters after selecting the basic chef parameters. - Allow for the running after install and run arguments to be configured. - Allow the omnibus url fetching retries to be configurable. - Move the chef running to its own helper function - Add module docs
2014-11-21Added unittests for IPv6 support for RHELShraddha Pandhe
2014-11-13Use test_helpers.TestCase for test_sshutil tests.Daniel Watkins
As requested by harlowja.
2014-11-12Handle = used as config delimiter in SSH config.Daniel Watkins
2014-11-12Add tests for current parse_ssh_config behaviour.Daniel Watkins
This also adds mock as a test dependency, as we are looking to migrate away from mocker.
2014-10-30Fix the digital ocean test on py2.6Joshua Harlow
The digital ocean datasource test is using assertIs which is only created/existent on py2.7, so for the older py2.6 we need to add similar logic so that the test works correctly there.
2014-10-20fix for rhel7 by using 'uses_systemd' to detect upstart/systemdScott Moser
2014-10-20Add Digital Ocean Datasource.Scott Moser
This adds a DataSource for DigitalOcean's metadata service. The service is documented at https://developers.digitalocean.com/metadata/ .
2014-10-18Pretty up the debug moduleJoshua Harlow
Previously the usage of the yaml_dumps module was causing any python unicode key and value to show up as: 'item': !!python/unicode "some string" This was not very pretty... Fix this by using safe_dumps (which is also a good thing to use and allow_unicode=True). Also create a tiny helper function in the cc_debug module that does not include the yaml start and end footers (since this module has its own footers and headers). Also includes a basic sanity test for this module.
2014-10-17Explicitly import only types being comparedNeal Shrader
2014-10-17Correct handling of single/multiple ssh keysNeal Shrader
2014-10-17Expose uses_systemd as a distro functionJoshua Harlow
Without this change the tests are currently failing on rhel7 since a location where a hostname file is written no longer exists at that location when systemd is active. To avoid this allow the test to inspect if the distro has systemd enabled and avoid testing the file when systemd is being used so the test passes. We likely need to figure out a better way to test features that no longer exist as files but exist as commands with systemd in general.
2014-10-16Use existing metadata crawler to populate datasourceNeal Shrader
2014-10-16Add tests for DigitalOcean datasourceNeal Shrader
2014-10-11More adjustmentsJoshua Harlow
- Use the generated_by() utility function to give the ruby template a better header comment - Set special parameters after selecting the basic chef parameters.
2014-10-10Fix some of the erroring out test casesJoshua Harlow
There are a couple new test cases that are now erroring out. - A usage of the non helper unit testcase base which is trigging and error on python 2.6 due to lack of method, fix this by using the base helper class. - A freebsd distro test check thats looking for /etc/resolv.conf and examining its contents, which won't exist due to our mocking routine that does not allow that file to be read. - A freebsd distro test where the distro class tries to call into ['ifconfig', '-a'] for a set of values, those values don't exist on the machine I am running on (and likely others machines) so we should mock the subp function out (that the distro class calls) and correctly return values that will work for the testcase.
2014-10-10Add a few template delete testsJoshua Harlow