summaryrefslogtreecommitdiff
path: root/tests/integration_tests/instances.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/instances.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/instances.py')
-rw-r--r--tests/integration_tests/instances.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/integration_tests/instances.py b/tests/integration_tests/instances.py
index 9b13288c..a0a5fb6b 100644
--- a/tests/integration_tests/instances.py
+++ b/tests/integration_tests/instances.py
@@ -47,14 +47,14 @@ class IntegrationInstance:
def pull_file(self, remote_path, local_path):
# First copy to a temporary directory because of permissions issues
tmp_path = _get_tmp_path()
- self.instance.execute('cp {} {}'.format(remote_path, tmp_path))
- self.instance.pull_file(tmp_path, local_path)
+ self.instance.execute('cp {} {}'.format(str(remote_path), tmp_path))
+ self.instance.pull_file(tmp_path, str(local_path))
def push_file(self, local_path, remote_path):
# First push to a temporary directory because of permissions issues
tmp_path = _get_tmp_path()
- self.instance.push_file(local_path, tmp_path)
- self.execute('mv {} {}'.format(tmp_path, remote_path))
+ self.instance.push_file(str(local_path), tmp_path)
+ self.execute('mv {} {}'.format(tmp_path, str(remote_path)))
def read_from_file(self, remote_path) -> str:
result = self.execute('cat {}'.format(remote_path))