summaryrefslogtreecommitdiff
path: root/tests/unittests/sources/helpers
Commit message (Collapse)AuthorAgeFilesLines
* openstack/static: honor the DNS servers associated with a network (#2138)Gonéri Le Bouder2023-04-281-0/+59
| | | | | | | | | The `network_data.json` allows the definition of the DNS through the `services` list at the network level. See: - https://opendev.org/openstack/nova/src/commit/700db274c613d6f8f30e5cdc3462beaeb0fda456/nova/tests/unit/network/test_network_info.py#L979-L980 - https://opendev.org/openstack/metalsmith/src/commit/f98dfa61c1d7475b81c20dabbf2c74198c38c793/metalsmith/test/test_network_metadata.py#L52-L90 - https://opendev.org/openstack/nova/commit/4b333b989dfc778a8b61db4a1b8552e988a10471
* test_cloud_sigma: delete useless test (#1828)sxt10012022-11-211-67/+0
|
* tests: Drop httpretty in favor of responses (#1720)Alberto Contreras2022-09-191-80/+80
|
* Identify 3DS Outscale Datasource as Ec2 (#1686)Maxime Dufour2022-09-021-0/+50
| | | | | | | | | | | | | | Outscale has an Ec2-compatible metadata service and is detected by: DMI product name: 3DS Outscale VM DMI vendor: 3DS Outscale The difference between stock Ec2 IMDS and Outscale is that the tags routes in their IMDS can return 404s if tags contain certain characters which result in 404 errors in cloud-int logs (LP: #1988157) To avoid errors in cloud-init on tag-related route 404s, add a parameter to retrieval_exception_ignore_cb to helpers/ec2/_get_instance_metadata to allow 404s on tag-related routes to be skipped.
* Misc module cleanup (#1418)Brett Holman2022-04-292-0/+344
| | | | - move datasource helpers to dedicated directory - drop unnecessary executable bit on shebangless python files
* Adopt Black and isort (SC-700) (#1157)James Falcon2021-12-152-151/+257
| | | | | Applied Black and isort, fixed any linting issues, updated tox.ini and CI.
* Reorganize unit test locations under tests/unittests (#1126)Brett Holman2021-12-032-0/+529
This attempts to standardize unit test file location under test/unittests/ such that any source file located at cloudinit/path/to/file.py may have a corresponding unit test file at test/unittests/path/to/test_file.py. Noteworthy Comments: ==================== Four different duplicate test files existed: test_{gpg,util,cc_mounts,cc_resolv_conf}.py Each of these duplicate file pairs has been merged together. This is a break in git history for these files. The test suite appears to have a dependency on test order. Changing test order causes some tests to fail. This should be rectified, but for now some tests have been modified in tests/unittests/config/test_set_passwords.py. A helper class name starts with "Test" which causes pytest to try executing it as a test case, which then throws warnings "due to Class having __init__()". Silence by changing the name of the class. # helpers.py is imported in many test files, import paths change cloudinit/tests/helpers.py -> tests/unittests/helpers.py # Move directories: cloudinit/distros/tests -> tests/unittests/distros cloudinit/cmd/devel/tests -> tests/unittests/cmd/devel cloudinit/cmd/tests -> tests/unittests/cmd/ cloudinit/sources/helpers/tests -> tests/unittests/sources/helpers cloudinit/sources/tests -> tests/unittests/sources cloudinit/net/tests -> tests/unittests/net cloudinit/config/tests -> tests/unittests/config cloudinit/analyze/tests/ -> tests/unittests/analyze/ # Standardize tests already in tests/unittests/ test_datasource -> sources test_distros -> distros test_vmware -> sources/vmware test_handler -> config # this contains cloudconfig module tests test_runs -> runs