diff options
author | James Falcon <james.falcon@canonical.com> | 2022-02-03 16:05:02 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-03 16:05:02 -0600 |
commit | aa47ec0ce020c56afb4308476a3b85254f15569d (patch) | |
tree | db06429bcd2d50a1e6dfc8b9f1d733b5098aef4a /tests | |
parent | 3f0918b57c6042de99da25bc6a9d120a074b8a8e (diff) | |
download | vyos-cloud-init-aa47ec0ce020c56afb4308476a3b85254f15569d.tar.gz vyos-cloud-init-aa47ec0ce020c56afb4308476a3b85254f15569d.zip |
testing: stop universally overwriting /etc/cloud/cloud.cfg.d (#1237)
As part of IN_PLACE testing, /etc/cloud/cloud.cfg.d get overwritten by
what's in the source tree. This can cause problems when the directory is
mounted in, because tests need the ability to modify files in
/etc/cloud. Attempting to 'lxc file push' instead will fail on LXD VMs
because the LXD agent isn't available yet.
If such functionality is desired, one can temporarily use the
'lxd_setup' mark while writing a test and push the files manually.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/integration_tests/clouds.py | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/tests/integration_tests/clouds.py b/tests/integration_tests/clouds.py index ef613339..83bc6af6 100644 --- a/tests/integration_tests/clouds.py +++ b/tests/integration_tests/clouds.py @@ -282,21 +282,6 @@ class _LxdIntegrationCloud(IntegrationCloud): ).format(**format_variables) subp(command.split()) - # /etc/cloud/cloud.cfg.d is a directory we write to in some - # integration tests. We can't use lxc mount in the container - # as /etc/cloud/cloud.cfg.d will then be owned nobody:nogroup and be - # read-only for root. - # Instead copy static files to the instance under test. - config_dir = os.path.join( - cloudinit_path, "..", "config", "cloud.cfg.d" - ) - for src_file in os.listdir(config_dir): - command = ( - f"lxc file push {config_dir}/{src_file} " - f"{instance.name}/etc/cloud/cloud.cfg.d/" - ) - subp(command.split()) - def _perform_launch(self, launch_kwargs, **kwargs): launch_kwargs["inst_type"] = launch_kwargs.pop("instance_type", None) wait = launch_kwargs.pop("wait", True) |