summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2015-07-21Use /dev/disk devices for Azure ephemeral disk.Daniel Watkins
The ephemeral disk will not necessarily be assigned the same name at each boot (LP: #1411582), so we use some udev rules to ensure we always get the right one.
2015-07-21Refactor cc_mounts.sanitize_devname to make it easier to modify.Daniel Watkins
2015-07-06Return a sensible value for DataSourceGCE.availability_zone.Daniel Watkins
2015-07-06Reduce repetition in GCE data source tests.Daniel Watkins
2015-06-16Use wget to fetch CloudStack passwords.Daniel Watkins
Different versions of the CloudStack password server respond differently; wget handles these nicely for us, so it's easier to just use wget. LP: #1440263, #1464253
2015-06-10Add a cloud-init plugin for helping users register and subscribe their ↵Daniel Watkins
RHEL-based systems. This patch adds a cloud-init plugin for helping users register and subscribe their RHEL based systems. As inputs, it can take: - user and password OR activation key and org | requires on of the two pair - auto-attach: True or False | optional - service-level: <string> | optional - add-pool [list, of, pool, ids] | optional - enable-repos [list, of, yum, repos, to, enable] | optional - disable-repos [list, of, yum, repos, to, disable] | optional You can also pass the following to influence your registration via rhsm.conf: - rhsm-baseurl | optional - server-hostname | optional
2015-06-03add tests for systemd detectionLars Kellogg-Stedman
This adds the following tests in test_distros.test_generic: - test_systemd_in_use Test the situation in which /run/systemd/system exists. - test_systemd_not_in_use Test the situation in which /run/systemd/system does not exists. - test_systemd_symlink This tests the situation in which /run/systemd/system exists but is a *symlink* to a directory, which according to sd_booted() should return false.
2015-06-03transform paths in functions taking more than a single argumentLars Kellogg-Stedman
Patch FilesystemMockingTestcase.patchOS to support methods taking more than a single path argument. This is required in order to properly mock `os.symlink`, which takes two path arguments.
2015-05-29Corrected spelling error on variable nameBrent Baude
2015-05-27Updated files with upstream review comments thanks to Dan and ScottBrent Baude
2015-05-22AZURE: Redact on-disk user password in /var/lib/ovf-env.xmlBen Howard
The fabric provides the user password in plain text via the CDROM, and cloud-init has previously wrote the ovf-env.xml in /var/lib/waagent with the password in plain text. This change redacts the password.
2015-05-21This commit consists of three things based on feedback from smosher:Brent Baude
cc_rh_subscription: Use of self.log.info limited, uses the util.subp for subprocesses, removed full path for subscription-manager cloud-config-rh_subscription.txt: A heavily commented example file on how to use rh_subscription and its main keys test_rh_subscription.py: a set of unittests for rh_subscription
2015-05-15temporarily disasble test if no bin/cloud-initScott Moser
the tests of bin/cloud-init would fail in a package build environment. so, temporariliy skip them in that environment.
2015-05-15pep8 fixesScott Moser
2015-05-15Azure: remove dependency on walinux-agentScott Moser
This takes away our dependency on walinux-agent, by providing a builtin path for doing cloud-init had delegated to it. Currently the default is to still use the old path, but adding this code in will allow us to move to the new code path with more confidence.
2015-05-14read_seeded: fix reed_seeded after regressionScott Moser
read_seeded was assuming a Response object back from load_tfile_or_url but load_tfile_or_url was returning string. since the only other user of this was a test, move load_tfile_or_url to a test, and just do the right thing in read_seeded. LP: #1455233
2015-05-08Fix retrying.Daniel Watkins
2015-05-08Reintroduce original code path.Daniel Watkins
2015-05-08Move our walinuxagent implementation to a single function call.Daniel Watkins
2015-05-08Stop using Python 3 only tempfile.TemporaryDirectory (but lose free cleanup).Daniel Watkins
2015-05-08Split WALinuxAgentShim code out to separate file.Daniel Watkins
2015-05-08Make find_endpoint a staticmethod to clean up top-level namespace.Daniel Watkins
2015-05-08Return a dict of data from WALinuxAgentShim, rather than accessing attributes.Daniel Watkins
2015-05-07Implement basic replacement for walinuxagent in Azure data source.Daniel Watkins
2015-05-01Fix exception when running with no arguments on Python 3Scott Moser
LP: #1424277
2015-05-01Update is_disk_used for changed enumerate_disk output.Scott Moser
LP: #1311463
2015-05-01fix 'Make pyflakes'Scott Moser
2015-05-01Azure: if user has set hostname, do not overwrite itScott Moser
Due to the way the azure boot works, where we identify the hostname to the fabric, we were inadvertently overwriting hostname that the user had set. LP: #1375252
2015-04-20GCE instance-level SSH keys override project-level keys. (LP: #1403617)Daniel Watkins
2015-04-20Add test that missing GCE required key returns False.Daniel Watkins
2015-04-16fix cloud-config-archive handlingScott Moser
handling of cloud-config-archive input would fail in fully_decoded_payload. part.get_charset() would return a Charset object, but get_charset.input_codec is a string suitable for passing to decode. This handles that correctly, and is more careful about binary data inside input. The test added verifies that cloud-config inside a cloud-config-archive is handled correctly and also that binary data there is ignored without exceptions raised. LP: #1445143
2015-04-16pep8 fixesScott Moser
2015-04-15Reset host name after bounce has allowed walinuxagent to run successfully.Daniel Watkins
2015-04-15Add unit tests for Azure hostname bouncing.Daniel Watkins
Including minor refactoring to make mocking considerably easier.
2015-03-31adjust cc_snappy for snappy install package with config.Scott Moser
It was believed that to install a package with config the command was: snappy install --config=config-file <package> Instead, what was implemented in snappy was: snappy install <package> [<config-file>] This modifies cloud-init to invoke the latter and changes the tests appropriately. LP: #1438836
2015-03-27remove debugScott Moser
2015-03-27be more user-friendly when looking for matching .configScott Moser
On fspath installs, look for .config files harder. Given a file named: pkg.namespace_0.version_arch.snap We'll search for config files named: pkg.namespace_0.version_arch.config pkg.namespace.config pkg.config
2015-03-27address namespacingScott Moser
2015-03-27change 'configs' to 'config', and namespace input to 'snappy config'Scott Moser
the input to 'snappy config <packagename>' is expected to have config: <packagename>: content: So here we pad that input correctly. Note, that a .config file on disk is not modified. Also, we change 'configs' to just be 'config', to be possibly compatible with the a future 'snappy config /' that dumped: config: pkg1: data1 pkg2: data2
2015-03-26add tests for data typesScott Moser
2015-03-26pep8, and some more testsScott Moser
2015-03-26start of snap_op testsScott Moser
2015-03-26commit work in progress. tests pass.Scott Moser
2015-03-25Ensure that the serial console is always closed.Daniel Watkins
2015-03-25Refactor tests to assume JoyentMetadataClient is correct.Daniel Watkins
We are treating JoyentMetadataClient as a unit which the data source depends on, so we mock it out instead of providing a fake implementation of it.
2015-03-25Convert DataSourceSmartOS to use v2 metadata.Daniel Watkins
2015-03-25Organise imports in test_smartos.py.Daniel Watkins
2015-03-18Add tests for cc_disk_setup.is_disk_used.Daniel Watkins
2015-03-13Write and read bytes to/from the SmartOS serial console.Daniel Watkins
2015-03-11userdata-handlers: python3-related fixes on do-not-process-this-part pathOleg Strikov
Cloud-init crashed when received multipart userdata object with 'application/octet-stream' part or some other 'application/*' part except archived ones (x-gzip and friends). These parts are not processed by cloud-init and result only in a message in the log. We used some non-python3-friendly techniques while generating this log message which was a reason for the crash.