forked from DefectDojo/django-DefectDojo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
local-integration-tests.sh
executable file
·140 lines (119 loc) · 4.19 KB
/
local-integration-tests.sh
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
#!/bin/bash
export DD_BASE_URL='http://localhost:8080/'
# All available Unittest Scripts are activated below
# If successful, A success message is printed and the script continues
# If any script is unsuccessful a failure message is printed and the test script
# Exits with status code of 1
echo "Running Product type integration tests"
if python3 tests/regulations_test.py ; then
echo "Success: Regulation integration tests passed"
else
docker-compose logs uwsgi --tail=120
echo "Error: Regulation integration test failed."; exit 1
fi
echo "Running Product type integration tests"
if python3 tests/product_type_test.py ; then
echo "Success: Product type integration tests passed"
else
docker-compose logs uwsgi --tail=120
echo "Error: Product type integration test failed."; exit 1
fi
echo "Running Product integration tests"
if python3 tests/product_test.py ; then
echo "Success: Product integration tests passed"
else
docker-compose logs uwsgi --tail=120
echo "Error: Product integration test failed"; exit 1
fi
echo "Running Dedupe integration tests"
if python3 tests/dedupe_test.py ; then
echo "Success: Dedupe integration tests passed"
else
docker-compose logs uwsgi --tail=120
echo "Error: Dedupe integration test failed"; exit 1
fi
echo "Running Endpoint integration tests"
if python3 tests/endpoint_test.py ; then
echo "Success: Endpoint integration tests passed"
else
docker-compose logs uwsgi --tail=120
echo "Error: Endpoint integration test failed"; exit 1
fi
echo "Running Engagement integration tests"
if python3 tests/engagement_test.py ; then
echo "Success: Engagement integration tests passed"
else
docker-compose logs uwsgi --tail=120
echo "Error: Engagement integration test failed"; exit 1
fi
echo "Running Environment integration tests"
if python3 tests/environment_test.py ; then
echo "Success: Environment integration tests passed"
else
docker-compose logs uwsgi --tail=120
echo "Error: Environment integration test failed"; exit 1
fi
echo "Running Finding integration tests"
if python3 tests/finding_test.py ; then
echo "Success: Finding integration tests passed"
else
docker-compose logs uwsgi --tail=120
echo "Error: Finding integration test failed"; exit 1
fi
echo "Running Test integration tests"
if python3 tests/test_test.py ; then
echo "Success: Test integration tests passed"
else
docker-compose logs uwsgi --tail=120
echo "Error: Test integration test failed"; exit 1
fi
echo "Running User integration tests"
if python3 tests/user_test.py ; then
echo "Success: User integration tests passed"
else
docker-compose logs uwsgi --tail=120
echo "Error: User integration test failed"; exit 1
fi
echo "Running Ibm Appscan integration test"
if python3 tests/ibm_appscan_test.py ; then
echo "Success: Ibm AppScan integration tests passed"
else
docker-compose logs uwsgi --tail=120
echo "Error: Ibm AppScan integration test failed"; exit 1
fi
echo "Running Report Builder integration tests"
if python3 tests/report_builder_test.py ; then
echo "Success: Report Builder integration tests passed"
else
docker-compose logs uwsgi --tail=120
echo "Error: Report Builder integration test failed."; exit 1
fi
echo "Running Search integration test"
if python3 tests/search_test.py ; then
echo "Success: Search integration tests passed"
else
docker-compose logs uwsgi --tail=120
echo "Error: Search integration test failed"; exit 1
fi
test="Check Various Pages integration test"
echo "Running: $test"
if python3 tests/check_various_pages.py ; then
success $test
else
fail $test
fi
# The below tests are commented out because they are still an unstable work in progress
## Once Ready they can be uncommented.
# echo "Running Import Scanner integration test"
# if python3 tests/import_scanner_test.py ; then
# echo "Success: Import Scanner integration tests passed"
# else
# echo "Error: Import Scanner integration test failed"; exit 1
# fi
# echo "Running Zap integration test"
# if python3 tests/zap.py ; then
# echo "Success: zap integration tests passed"
# else
# echo "Error: Zap integration test failed"; exit 1
# fi
exec echo "Done Running all configured integration tests."