-
Notifications
You must be signed in to change notification settings - Fork 14
/
docker-entrypoint.sh
executable file
·51 lines (41 loc) · 1.25 KB
/
docker-entrypoint.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
#!/bin/sh
set -e
if [ "$ENV" = "DEV" ]; then
echo "Running Development Application"
pip install --no-deps -e .
exec python mosquittoChat/server.py
elif [ "$ENV" = "UNIT_TEST" ]; then
echo "Running Unit Tests"
pip install --no-deps -e .
exec pytest -v -s --cov=./mosquittoChat tests/unit
# exec tox -e unit
elif [ "$ENV" = "CONTRACT_TEST" ]; then
echo "Running Contract Tests"
pip install --no-deps -e .
exec pytest -v -s --cov=./mosquittoChat tests/contract
# exec tox -e contract
elif [ "$ENV" = "INTEGRATION_TEST" ]; then
echo "Running Integration Tests"
pip install --no-deps -e .
exec pytest -v -s --cov=./mosquittoChat tests/integration
# exec tox -e integration
elif [ "$ENV" = "COMPONENT_TEST" ]; then
echo "Running Component Tests"
pip install --no-deps .
exec python mosquittoChat/server.py
elif [ "$ENV" = "END_TO_END_TEST" ]; then
echo "Running End_To_End Tests"
pip install --no-deps .
exec python mosquittoChat/server.py
elif [ "$ENV" = "LOAD" ]; then
echo "Running Load Tests"
pip install --no-deps .
exec python mosquittoChat/server.py
elif [ "$ENV" = "PROD" ]; then
echo "Running Production Application"
pip install --no-deps .
exec python mosquittoChat/server.py
else
echo "Please provide an environment"
echo "Stopping"
fi