forked from stackrox/stackrox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbase_qa_e2e_test.py
executable file
·73 lines (68 loc) · 2.14 KB
/
base_qa_e2e_test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/usr/bin/env -S python3 -u
"""
Run QA e2e tests against a given cluster.
"""
from pre_tests import PreSystemTests
from ci_tests import (
QaE2eTestPart1,
QaE2eTestPart2,
QaE2eDBBackupRestoreTest,
CustomSetTest,
)
from post_tests import PostClusterTest, CheckStackroxLogs, FinalPost
from runners import ClusterTestSetsRunner
def make_qa_e2e_test_runner(cluster):
return ClusterTestSetsRunner(
cluster=cluster,
initial_pre_test=PreSystemTests(),
sets=[
{
"name": "QA tests part I",
"test": QaE2eTestPart1(),
"post_test": PostClusterTest(
check_stackrox_logs=True,
artifact_destination_prefix="part-1",
),
},
{
"name": "QA tests part II",
"test": QaE2eTestPart2(),
"post_test": PostClusterTest(
check_stackrox_logs=True,
artifact_destination_prefix="part-2",
),
"always_run": False,
},
{
"name": "DB backup and restore",
"test": QaE2eDBBackupRestoreTest(),
"post_test": CheckStackroxLogs(
check_for_errors_in_stackrox_logs=True,
artifact_destination_prefix="db-test",
),
"always_run": False,
},
],
final_post=FinalPost(
store_qa_tests_data=True,
),
)
def make_qa_e2e_test_runner_custom(cluster):
return ClusterTestSetsRunner(
cluster=cluster,
initial_pre_test=PreSystemTests(run_poll_for_system_test_images=False),
sets=[
{
"name": "Custom set of tests for p/z",
"test": CustomSetTest(),
"post_test": PostClusterTest(
check_stackrox_logs=True,
artifact_destination_prefix="custom-pz",
),
},
],
final_post=FinalPost(
store_qa_tests_data=True,
handle_e2e_progress_failures=False,
),
)