summaryrefslogtreecommitdiff
path: root/tests/cloud_tests/args.py
diff options
context:
space:
mode:
authorChad Smith <chad.smith@canonical.com>2018-06-12 10:14:07 -0600
committerChad Smith <chad.smith@canonical.com>2018-06-12 10:14:07 -0600
commit7b3c21615dac3b0d9163c9883309a2e7b675622a (patch)
treec9a29bea0a1677d651861eaa9a93e6f44a60598c /tests/cloud_tests/args.py
parentc3f1ad9abd4a28c1b4c1f34db28ac72a646cdca6 (diff)
downloadvyos-cloud-init-7b3c21615dac3b0d9163c9883309a2e7b675622a.tar.gz
vyos-cloud-init-7b3c21615dac3b0d9163c9883309a2e7b675622a.zip
test: add optional --preserve-instance arg to integraiton tests
By default, integration tests destroy the test instances after each test run. To aid debug and development of integration tests, support a --preserve-instance argument which will leave the modified test instance in a stopped state for further debug.
Diffstat (limited to 'tests/cloud_tests/args.py')
-rw-r--r--tests/cloud_tests/args.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/cloud_tests/args.py b/tests/cloud_tests/args.py
index c6c1877b..ab345491 100644
--- a/tests/cloud_tests/args.py
+++ b/tests/cloud_tests/args.py
@@ -62,6 +62,9 @@ ARG_SETS = {
(('-d', '--data-dir'),
{'help': 'directory to store test data in',
'action': 'store', 'metavar': 'DIR', 'required': False}),
+ (('--preserve-instance',),
+ {'help': 'do not destroy the instance under test',
+ 'action': 'store_true', 'default': False, 'required': False}),
(('--preserve-data',),
{'help': 'do not remove collected data after successful run',
'action': 'store_true', 'default': False, 'required': False}),),