summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2016-08-12DigitalOcean: use the v1.json endpointBen Howard
Per [1], DigitalOcean provides the metadata in multiple formats. The JSON document is the preferred endpoint. Changes: - Switch to the v1.json meta-data endpoint - Identify droplet identity from SMBIOS - Only poll for metadata when the instance is confirmed to be a droplet - Removal of hard-coded mirrors Additionally, centralize the gates on running 'dmidecode' on arm arches, and update tests to address. [1] https://developers.digitalocean.com/documentation/metadata/
2016-08-12MAAS: add vendor-data supportScott Moser
Add vendor-data support to maas which will behave like the openstack vendor-data does. Data returned from maas must be yaml loadable. Also update the main in DataSourceMAAS to "just work" on a maas deployed system. LP: #1612313
2016-08-11Upgrade to a configobj package new enough to workJoshua Harlow
The older versions have various issues with unicode and those versions seem to be pulled into epel so we should denote that those versions are bad and shouldn't be used by updating to a newer version that does work.
2016-08-11ConfigDrive: recognize 'tap' as a link type.Scott Moser
This just adds 'tap' to the list of types that are understood to be physical or virtual network devices. Openstack basically exposes the type of the host device through. LP: #1610784
2016-08-11NoCloud: fix bug providing network-interfaces via meta-data.Scott Moser
This fixes an issue with the NoCloud datasource where it would not recognize the 'network-interfaces' key provided in meta-data. LP: 1577982
2016-08-10add ntp config moduleRyan Harper
Add support for installing and configuring ntp service, exposing the minimum config of servers or pools to be added. If none are defined then fallback on generating a list of pools by distro hosted at pool.ntp.org (which matches what's found in the default ntp.conf shipped in the respective distro).
2016-08-10SmartOS: more improvements for network configurationScott Moser
This improves smart os network configuration - fix the SocketClient which was previously completely broken. - adds support for configuring dns servers and dns search (based off the sdc:dns_domain). - support 'sdc:gateways' information from the datasource for configuring default routes. - add converted network information to output when module is run as a main This does not support 'sdc:routes' as described at http://eng.joyent.com/mdata/datadict.html
2016-07-29fix pep8 errors in mcollective unit testsScott Moser
Just fix the pep8 errors added in previous commit.
2016-07-19mcollective: add tests, cleanups and bug fix when no config in /etc.Scott Moser
Things here: - restart rather than 'start' the service, to pick up a config change that we would have written. - update the config and write cert files whether or not the file existed on the system. Previously it would only write the cert files if /etc/mcollective/server.cfg already existed. - improve test coverage
2016-07-14merge from trunkScott Moser
2016-07-14ConfigDrive: fix writing of 'injected' files and legacy networkingScott Moser
Previous commit inadvertently disabled the consumption of 'injected' files in configdrive (openstack server boot --file=/target/file=local-file) unless the datasource was in 'pass' mode. The default mode is 'net' so that was not likely to happen. Also here are: a.) some comments to apply_network_config b.) add backwards compatibility for distros that do not yet implement apply_network_config by converting the network config into ENI format and calling apply_network. This is required because prior to the previous commit, those distros would have had 'apply_network' called with the openstack provided ENI file. But after this change they will have apply_network_config called by cloudinit's main. c.) add network_state_to_eni for converting net config to eni it supports the not-actually-correct 'hwaddress' field in ENI LP: #1602373
2016-07-14flake8Scott Moser
2016-07-14add test of apply_network fallback path.Scott Moser
we could do this more simply by mocking fbsd.apply_network and checking it's inputs. but this pushes it through the whole path that the other test does.
2016-07-14fix tox flake8Scott Moser
2016-07-14Change StringIO to BytesIO in cc_mcollective.pySergii Golovatiuk
* StringIO from six doesn't act as 'binary stream' in Python 3. This patch changes StringIO to BytesIO to have code compatible with Python 3 and Python 2. * Add try/except for IOError in case when server.cfg doesn't exists. This is necessary for unit tests or cases when server.cfg is not included to package * Add UnitTest for cc_mcollective.py LP: #1597699
2016-07-13merge from trunk.lp1602373Scott Moser
this merges in the render_hwaddress support. newly added tests still run, so hwaddress seems correctly getting in.
2016-07-13merge with trunkScott Moser
2016-07-13ConfigDrive: write 'injected' files and legacy networkingScott Moser
Previous commit disabled the consumption of 'injected' files in configdrive (openstack server boot --file=/target/file=local-file) unless the datasource was in 'pass' mode. The default mode is 'net' so that would never happen. Also here are: a.) a fix for 'links_path_prefix' string from debian, to finally disable the rendering of systemd.link files (LP: #1594546) b.) some comments to apply_network_config c.) implement a backwards compatibility for for distros that do not yet implement apply_network_config by converting the network config into ENI format and calling apply_network. This is required because prior to the previous commit, those distros would have had 'apply_network' called with the openstack provided ENI file. But after this change they will have apply_network_config called by cloudinit's main. d.) a network_state_to_eni helper for converting net config to eni it supports the not-actually-correct 'hwaddress' field in ENI. LP: #1602373
2016-06-22rename test class, add a test, improve test namesScott Moser
2016-06-21user_data: fix error when user-data is not utf-8 decodableScott Moser
when user-data was not decodable, cloud-init would raise exception. LP: #1532072
2016-06-21no longer skip 'lo' elements when reading. pass 3rd test.Scott Moser
2016-06-21fix flake8Scott Moser
2016-06-21make 2 of 3 tests passScott Moser
2016-06-21fix lost per-interface routes, use post-up to bring up interface aliasesScott Moser
Fix the lack of per-interface routes, and add an example to yaml. in revno 394 in curtin, we added post-up for interface aliases. bring that commit here.
2016-06-21commit test changesScott Moser
cleaned up tests a bit. still they raise exception, but print out the files rendered and all use the _render_and_read helper.
2016-06-20merge with trunk.Scott Moser
test runs to the point where it did, think I got most of the changes incorporated.
2016-06-15merge with trunkScott Moser
2016-06-15move 'main' into cloudinit/cmd/ for easier testingScott Moser
This moves bin/cloud-init's content into cloudinit/cmd/main.py, and then fixes the pep8/flake8 issues with that. The end result is easier testing of main.
2016-06-15Fixup code review commentsJoshua Harlow
2016-06-15Remove some unused importsJoshua Harlow
2016-06-15Fix a few tools and tests for newer pep8Joshua Harlow
2016-06-15Re-apply "Remove trailing dot from GCE metadata URL (LP: #1581200) [Phil Roche]"Daniel Watkins
This commit includes the content of that commit, plus a fix for the tests (provided by Phil).
2016-06-14Make the bin/cloud-init an actual console entrypointJoshua Harlow
This allows for the test_cli test to be more sane.
2016-06-14Make the os samples easier to extend (for new samples)Joshua Harlow
2016-06-10Add a bunch more sample tests for sysconfigJoshua Harlow
2016-06-10Add a sysconfig rendering testJoshua Harlow
2016-06-10Refactor a large part of the networking code.Joshua Harlow
Splits off distro specific code into specific files so that other kinds of networking configuration can be written by the various distro(s) that cloud-init supports. It also isolates some of the cloudinit.net code so that it can be more easily used on its own (and incorporated into other projects such as curtin). During this process it adds tests so that the net process can be tested (to some level) so that the format conversion processes can be tested going forward.
2016-06-10Just mock 'on_first_boot' vs special argumentJoshua Harlow
2016-06-10Just do all the imports on one lineJoshua Harlow
2016-06-10remove unused importScott Moser
2016-06-10one moreScott Moser
2016-06-10fix one large source of leaked tmpfilesScott Moser
2016-06-10minor changes prior to mergeScott Moser
a.) remove 'gpg_' from function names in new gpg module. b.) use --recv-keys rather than --recv --recv-keys is more obvious and works back to precise at least. c.) do not trim trailing '\n' from a armour'd key.
2016-06-09mock is_resolvable in mirrorfail tests to remove dependency to external netChristian Ehrhardt
2016-06-09fix docstring for check connectivityChristian Ehrhardt
2016-06-09remove unused BIN_APT constantChristian Ehrhardt
2016-06-09move SkipTest definition to tests/unittests/helpers.py to be reusableChristian Ehrhardt
2016-06-09move gpg functions into gpg.pyChristian Ehrhardt
This helps for cleaner code structuring. ALong that makeing sure all these functions have a gpg_prefix.
2016-06-07enable test_handler_apt_source unittests on CentOSChristian Ehrhardt
Tested and working on CentOS7 (container), so we can enable the tests
2016-06-07mock get_primary_arch for TestAptSourceConfigSourceList for CentOSChristian Ehrhardt
This allows the unittest to pass on CentOS, before it failed as it had no dpkg available.