Skip to content

Commit e6543b6

Browse files
committed
Experimental: add testcase pre-flight-check
Signed-off-by: Matthias Büchse <matthias.buechse@alasca.cloud>
1 parent 64bbd43 commit e6543b6

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

Tests/iaas/openstack_test.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747

4848

4949
logger = logging.getLogger(__name__)
50+
PREFLIGHT_ID = 'pre-flight-check'
5051

5152

5253
def usage(rcode=1, file=sys.stderr):
@@ -277,10 +278,11 @@ def main(argv):
277278
try:
278279
run_preflight_checks(c)
279280
except Exception:
280-
logger.critical("Pre-flight checks failed. Reporting all testcases as ABORT.")
281-
for testcase in testcases:
282-
print(f"{testcase}: ABORT")
281+
logger.critical("Pre-flight checks failed. Reporting pre-flight as ABORT.")
282+
print(f'{PREFLIGHT_ID}: ABORT')
283283
raise
284+
else:
285+
print(f'{PREFLIGHT_ID}: PASS')
284286
for testcase in testcases:
285287
harness(testcase, lambda: getattr(c, testcase.replace('-', '_')))
286288
return 0

Tests/scs-compatible-iaas.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ scripts:
1111
- executable: ./iaas/openstack_test.py
1212
args: -c {os_cloud} {testcases}
1313
testcases:
14+
- id: pre-flight-check
15+
description: Checks whether tests can be run at all (authentication etc.).
1416
- id: scs-0100-syntax-check
1517
description: Flavor names starting `SCS-` comply with syntax.
1618
url: https://docs.scs.community/standards/scs-0100-w1-flavor-naming-implementation-testing#automated-tests
@@ -292,6 +294,11 @@ scripts:
292294
Manual check: Must fulfill all requirements of scs-0302-v1.
293295
url: https://docs.scs.community/standards/scs-0302-v1-domain-manager-role#conformance-tests
294296
modules:
297+
- id: preflight
298+
name: Pre-flight checks
299+
targets:
300+
main:
301+
- pre-flight-check
295302
- id: opc-v2022.11
296303
name: >-
297304
scs-0128-v1: SCS end-to-end testing (formerly OpenStack-powered Compute)
@@ -575,6 +582,7 @@ timeline:
575582
versions:
576583
- version: next
577584
include:
585+
- preflight
578586
- opc-v2022.11
579587
- scs-0100-v3.1
580588
- scs-0101-v1
@@ -593,6 +601,7 @@ versions:
593601
- version: v5.1 # copy of v5, but with include "scs-0123-v1", which had simply been forgotten
594602
stabilized_at: 2024-12-19
595603
include:
604+
- preflight
596605
- opc-v2022.11
597606
- scs-0100-v3.1
598607
- scs-0101-v1

0 commit comments

Comments
 (0)