summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Smith <dansmith@redhat.com>2023-05-02 14:56:58 -0700
committerDan Smith <dansmith@redhat.com>2023-05-05 08:54:43 -0700
commite5da6756b9e7fb8fbedade5d3a428e0a8bff94ff (patch)
tree4591619f2d6643c03a17b5671f87ab33b504b05e
parent274878649feab7b3b8f13dcc46fae924877c7142 (diff)
downloadtempest-e5da6756b9e7fb8fbedade5d3a428e0a8bff94ff.tar.gz
Also require resources for PINGABLE
This adds to the existing check to make sure that if a test requires PINGABLE state that they provide the validation resources and flags necessary to do that validation. Change-Id: I0620fd93ee2dc37e53ae991967321f88cf9d67a8
-rw-r--r--tempest/common/compute.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/tempest/common/compute.py b/tempest/common/compute.py
index 7fa82478d..53d44f1fa 100644
--- a/tempest/common/compute.py
+++ b/tempest/common/compute.py
@@ -299,16 +299,15 @@ def create_test_server(clients, validatable=False, validation_resources=None,
if wait_until:
- if wait_until == 'SSHABLE' and not (
- validatable and validation_resources is not None):
- raise RuntimeError('SSHABLE requires validatable=True and '
- 'validation_resources to be passed')
-
# NOTE(lyarwood): PINGABLE and SSHABLE both require the instance to
# go ACTIVE initially before we can setup the fip(s) etc so stash
# this additional wait state for later use.
wait_until_extra = None
if wait_until in ['PINGABLE', 'SSHABLE']:
+ if not validatable and validation_resources is None:
+ raise RuntimeError(
+ 'SSHABLE/PINGABLE requires validatable=True '
+ 'and validation_resources to be passed')
wait_until_extra = wait_until
wait_until = 'ACTIVE'