summaryrefslogtreecommitdiff
path: root/tests/integration_tests/integration_settings.py
diff options
context:
space:
mode:
authorJames Falcon <TheRealFalcon@users.noreply.github.com>2020-11-24 15:05:47 -0600
committerGitHub <noreply@github.com>2020-11-24 14:05:47 -0700
commitbc9c6c22dad7f17590d476fe9f7a25e7e7a167ad (patch)
tree692679cdadce4d50001cc33133710ba28ff0ef32 /tests/integration_tests/integration_settings.py
parent47f4229ebcef9f83df8b549bb869a2dbf6dff17c (diff)
downloadvyos-cloud-init-bc9c6c22dad7f17590d476fe9f7a25e7e7a167ad.tar.gz
vyos-cloud-init-bc9c6c22dad7f17590d476fe9f7a25e7e7a167ad.zip
Collect logs from integration test runs (#675)
During teardown of every cloud instance, run 'cloud-init collect-logs', then transfer and unpack locally. Two new integration settings have been added to specify when to perform this action (ALWAYS, ON_ERROR, NEVER), and where to store these logs.
Diffstat (limited to 'tests/integration_tests/integration_settings.py')
-rw-r--r--tests/integration_tests/integration_settings.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/integration_tests/integration_settings.py b/tests/integration_tests/integration_settings.py
index a0609f7e..9be9a94f 100644
--- a/tests/integration_tests/integration_settings.py
+++ b/tests/integration_tests/integration_settings.py
@@ -55,6 +55,16 @@ EXISTING_INSTANCE_ID = None
# A path to a valid package to be uploaded and installed
CLOUD_INIT_SOURCE = 'NONE'
+# Before an instance is torn down, we run `cloud-init collect-logs`
+# and transfer them locally. These settings specify when to collect these
+# logs and where to put them on the local filesystem
+# One of:
+# 'ALWAYS'
+# 'ON_ERROR'
+# 'NEVER'
+COLLECT_LOGS = 'ON_ERROR'
+LOCAL_LOG_PATH = '/tmp/cloud_init_test_logs'
+
##################################################################
# GCE SPECIFIC SETTINGS
##################################################################