forked from DefectDojo/django-DefectDojo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
local-integration-tests.sh
131 lines (112 loc) · 4.08 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
#!/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/Product_type_unit_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_unit_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_unit_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_unit_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_unit_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_unit_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_unit_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_unit_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_unit_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
# everything in the smoke test is already covered by the other tests
# echo "Running Smoke integration test"
# if python3 tests/smoke_test.py ; then
# echo "Success: Smoke integration tests passed"
# else
# docker-compose logs uwsgi --tail=120
# echo "Error: Smoke integration test failed"; exit 1
# fi
echo "Running Check Status test"
if python3 tests/check_status.py ; then
echo "Success: check status tests passed"
else
docker-compose logs uwsgi --tail=120
echo "Error: Check status tests failed"; exit 1
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_unit_test.py ; then
# echo "Success: Import Scanner integration tests passed"
# else
# echo "Error: Import Scanner integration test failed"; exit 1
# fi
# echo "Running Check Status UI integration test"
# if python3 tests/check_status_ui.py ; then
# echo "Success: Check Status UI tests passed"
# else
# echo "Error: Check Status UI 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."