summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Watkins <oddbloke@ubuntu.com>2020-10-16 10:41:21 -0400
committerGitHub <noreply@github.com>2020-10-16 08:41:21 -0600
commitc0e8480678e3a9173c9de1271f651fb3ba375f22 (patch)
tree94b16ebe80affb805706b05acc37254159b922eb /tests
parent268fefa309c20181f18ce1081e26aa90cc0b2f85 (diff)
downloadvyos-cloud-init-c0e8480678e3a9173c9de1271f651fb3ba375f22.tar.gz
vyos-cloud-init-c0e8480678e3a9173c9de1271f651fb3ba375f22.zip
integration_tests: emit settings to log during setup (#601)
Diffstat (limited to 'tests')
-rw-r--r--tests/integration_tests/conftest.py1
-rw-r--r--tests/integration_tests/platforms.py11
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/integration_tests/conftest.py b/tests/integration_tests/conftest.py
index 37197ae3..9c4eb03a 100644
--- a/tests/integration_tests/conftest.py
+++ b/tests/integration_tests/conftest.py
@@ -48,6 +48,7 @@ def setup_image():
"""
client = dynamic_client()
log.info('Setting up environment for %s', client.datasource)
+ client.emit_settings_to_log()
if integration_settings.CLOUD_INIT_SOURCE == 'NONE':
pass # that was easy
elif integration_settings.CLOUD_INIT_SOURCE == 'IN_PLACE':
diff --git a/tests/integration_tests/platforms.py b/tests/integration_tests/platforms.py
index 3755eb1e..bade5fe0 100644
--- a/tests/integration_tests/platforms.py
+++ b/tests/integration_tests/platforms.py
@@ -37,6 +37,17 @@ class IntegrationClient(ABC):
self.launch_kwargs = launch_kwargs if launch_kwargs else {}
self.client = self._get_client()
+ def emit_settings_to_log(self) -> None:
+ log.info(
+ "\n".join(
+ ["Settings:"]
+ + [
+ "{}={}".format(key, getattr(self.settings, key))
+ for key in sorted(self.settings.current_settings)
+ ]
+ )
+ )
+
@abstractmethod
def _get_client(self):
raise NotImplementedError