Add cofnig jenkins API + install node on server + install pip in jenkins docker
This commit is contained in:
71
Config API Jenkins.sh
Normal file
71
Config API Jenkins.sh
Normal file
@ -0,0 +1,71 @@
|
||||
#!/bin/sh
|
||||
pip3 install -r requirements.txt
|
||||
pip3 install -U pytest
|
||||
|
||||
echo
|
||||
echo "#\n# Launching the users unit tests\n#"
|
||||
echo
|
||||
python3 -m pytest Tests/test_api_user.py -v
|
||||
status=$?
|
||||
if test $status -ne 0
|
||||
then
|
||||
echo "Error when executing the Users unit tests."
|
||||
exit 1
|
||||
else
|
||||
echo "Successfully passed the Users unit tests."
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "#\n# Launching the reports unit tests\n#"
|
||||
echo
|
||||
python3 -m pytest Tests/test_api_reports.py -v
|
||||
status=$?
|
||||
if test $status -ne 0
|
||||
then
|
||||
echo "Error when executing the Reports unit tests."
|
||||
exit 1
|
||||
else
|
||||
echo "Successfully passed the Reports unit tests."
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "#\n# Launching the reports unit tests\n#"
|
||||
echo
|
||||
python3 -m pytest Tests/pytest_api_vehicles.py -v
|
||||
status=$?
|
||||
if test $status -ne 0
|
||||
then
|
||||
echo "Error when executing the Vehicles unit tests."
|
||||
exit 1
|
||||
else
|
||||
echo "Successfully passed the Vehicles unit tests."
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "#\n# Launching the Authentifications unit tests\n#"
|
||||
echo
|
||||
python3 -m pytest Tests/test_api_login.py -v
|
||||
status=$?
|
||||
if test $status -ne 0
|
||||
then
|
||||
echo "Error when executing the Authentifications unit tests."
|
||||
exit 1
|
||||
else
|
||||
echo "Successfully passed the Authentifications unit tests."
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "#\n# Launching the Emails unit tests\n#"
|
||||
echo
|
||||
python3 -m pytest Tests/test_api_email.py -v
|
||||
status=$?
|
||||
if test $status -ne 0
|
||||
then
|
||||
echo "Error when executing the Emails unit tests."
|
||||
exit 1
|
||||
else
|
||||
echo "Successfully passed the Emails unit tests."
|
||||
fi
|
||||
|
||||
echo
|
||||
exit 0
|
Reference in New Issue
Block a user