summaryrefslogtreecommitdiff
path: root/tests/cloud_tests/platforms
diff options
context:
space:
mode:
authorDaniel Watkins <oddbloke@ubuntu.com>2020-05-14 09:27:44 -0400
committerGitHub <noreply@github.com>2020-05-14 09:27:44 -0400
commit089408751cdbd7950f58616f9d85ff9dfd9aa3c7 (patch)
tree376b9e7663eb82e84d5129c1dc04e6fce4904dff /tests/cloud_tests/platforms
parent2e32c40a607250bc9e713c0daf360dc6617f4420 (diff)
downloadvyos-cloud-init-089408751cdbd7950f58616f9d85ff9dfd9aa3c7.tar.gz
vyos-cloud-init-089408751cdbd7950f58616f9d85ff9dfd9aa3c7.zip
cloud_tests: emit dots on Travis while fetching images (#347)
This ensures that Travis will not kill our tests if fetching images is taking a long time. In implementation terms, this introduces a context manager which will spin up a multiprocessing.Process in the background and print a dot to stdout every 10 seconds. The process is terminated when the context manager exits. This also drop the use of travis_wait, which was being used to work around this issue.
Diffstat (limited to 'tests/cloud_tests/platforms')
-rw-r--r--tests/cloud_tests/platforms/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/cloud_tests/platforms/__init__.py b/tests/cloud_tests/platforms/__init__.py
index 6a410b84..e506baa0 100644
--- a/tests/cloud_tests/platforms/__init__.py
+++ b/tests/cloud_tests/platforms/__init__.py
@@ -6,6 +6,7 @@ from .ec2 import platform as ec2
from .lxd import platform as lxd
from .nocloudkvm import platform as nocloudkvm
from .azurecloud import platform as azurecloud
+from ..util import emit_dots_on_travis
PLATFORMS = {
'ec2': ec2.EC2Platform,
@@ -17,7 +18,8 @@ PLATFORMS = {
def get_image(platform, config):
"""Get image from platform object using os_name."""
- return platform.get_image(config)
+ with emit_dots_on_travis():
+ return platform.get_image(config)
def get_instance(snapshot, *args, **kwargs):