From 3f0918b57c6042de99da25bc6a9d120a074b8a8e Mon Sep 17 00:00:00 2001 From: James Falcon Date: Thu, 3 Feb 2022 15:37:14 -0600 Subject: Integration test changes (#1240) * Wrap the log fetching code in a try/except in case file is missing * Stop checking NoCloud seed dir when testing datasource detection --- tests/integration_tests/conftest.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests/integration_tests/conftest.py') diff --git a/tests/integration_tests/conftest.py b/tests/integration_tests/conftest.py index b2bc9eb7..a90a5d49 100644 --- a/tests/integration_tests/conftest.py +++ b/tests/integration_tests/conftest.py @@ -206,7 +206,11 @@ def _collect_logs( os.symlink(log_dir.parent, last_symlink) tarball_path = log_dir / "cloud-init.tar.gz" - instance.pull_file("/var/tmp/cloud-init.tar.gz", tarball_path) + try: + instance.pull_file("/var/tmp/cloud-init.tar.gz", tarball_path) + except Exception as e: + log.error("Failed to pull logs: %s", e) + return tarball = TarFile.open(str(tarball_path)) tarball.extractall(path=str(log_dir)) -- cgit v1.2.3