diff options
author | Daniel Watkins <oddbloke@ubuntu.com> | 2020-11-19 12:42:49 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-19 12:42:49 -0500 |
commit | bfaee8cc9b8fd23dbc118ae548fc2ca695a0d707 (patch) | |
tree | 790b49ace9893745f8d5850f3f7aa73de04dce02 | |
parent | eea754492f074e00b601cf77aa278e3623857c5a (diff) | |
download | vyos-cloud-init-bfaee8cc9b8fd23dbc118ae548fc2ca695a0d707.tar.gz vyos-cloud-init-bfaee8cc9b8fd23dbc118ae548fc2ca695a0d707.zip |
integration_tests: restore emission of settings to log (#657)
-rw-r--r-- | tests/integration_tests/clouds.py | 11 | ||||
-rw-r--r-- | tests/integration_tests/conftest.py | 1 | ||||
-rw-r--r-- | tests/integration_tests/instances.py | 11 |
3 files changed, 12 insertions, 11 deletions
diff --git a/tests/integration_tests/clouds.py b/tests/integration_tests/clouds.py index 71d4e85d..fe89c0c6 100644 --- a/tests/integration_tests/clouds.py +++ b/tests/integration_tests/clouds.py @@ -31,6 +31,17 @@ class IntegrationCloud(ABC): self.cloud_instance = self._get_cloud_instance() self.image_id = self._get_initial_image() + 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_cloud_instance(self): raise NotImplementedError diff --git a/tests/integration_tests/conftest.py b/tests/integration_tests/conftest.py index 34e674e9..eacb2ae2 100644 --- a/tests/integration_tests/conftest.py +++ b/tests/integration_tests/conftest.py @@ -62,6 +62,7 @@ def session_cloud(): ) cloud = platforms[integration_settings.PLATFORM]() + cloud.emit_settings_to_log() yield cloud cloud.destroy() diff --git a/tests/integration_tests/instances.py b/tests/integration_tests/instances.py index d64c1ab2..0db7c07b 100644 --- a/tests/integration_tests/instances.py +++ b/tests/integration_tests/instances.py @@ -29,17 +29,6 @@ class IntegrationInstance: self.instance = instance self.settings = settings - 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) - ] - ) - ) - def destroy(self): self.instance.delete() |