ci: remove tests
This commit is contained in:
parent
d5f022fd1e
commit
6e1c0d79dd
1 changed files with 0 additions and 48 deletions
48
.drone.yml
48
.drone.yml
|
@ -93,51 +93,3 @@ steps:
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- tag
|
- tag
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: test
|
|
||||||
depends_on:
|
|
||||||
- selfhosted
|
|
||||||
- dockerhub
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: test
|
|
||||||
image: registry.mgrote.net/python-api-server:latest
|
|
||||||
environment:
|
|
||||||
MAX_CONTENT_LENGTH: 50
|
|
||||||
UPLOAD_DIRECTORY: /uploads
|
|
||||||
AUTH_TOKEN: myuploadtoken
|
|
||||||
ENABLE_WEBSERVER: false
|
|
||||||
DEBIAN_FRONTEND: noninteractive
|
|
||||||
commands:
|
|
||||||
- |
|
|
||||||
apt update
|
|
||||||
apt install wget jq curl -y
|
|
||||||
python3 -m gunicorn app:app c gunicorn_config.py &
|
|
||||||
export TOKEN=myuploadtoken
|
|
||||||
export URL="127.0.0.1:5000"
|
|
||||||
mkdir -p tests
|
|
||||||
echo "Test: normaler Upload"
|
|
||||||
echo content > tests/file
|
|
||||||
curl -X POST -H "token: $TOKEN" -F "file=@tests/file" $URL/upload | jq
|
|
||||||
echo "Test: leerer Upload"
|
|
||||||
curl -X POST -H "token: $TOKEN" $URL/upload | jq
|
|
||||||
echo "Test: fehlerhafter Dateiname Upload"
|
|
||||||
touch ./tests/'hallo\welt.txt'
|
|
||||||
curl -X POST -H "token: $TOKEN" -F "file=@tests/hallo\welt.txt" $URL/upload | jq
|
|
||||||
echo "Test: List Files"
|
|
||||||
curl -H "token: $TOKEN" $URL/list | jq
|
|
||||||
echo "Test: download Datei"
|
|
||||||
wget $URL/download/file -o ./tests/file
|
|
||||||
ls -lah ./tests/file
|
|
||||||
echo "Test: download nicht vorhandene Datei"
|
|
||||||
wget $URL/download/file2
|
|
||||||
echo "Test: lösche Datei"
|
|
||||||
curl -X DELETE -H "token: $TOKEN" $URL/delete/file | jq
|
|
||||||
echo "Test: lösche nicht vorhandene Datei"
|
|
||||||
curl -X DELETE -H "token: $TOKEN" $URL/delete/file2 | jq
|
|
||||||
echo "Test: check health"
|
|
||||||
curl $URL/health
|
|
||||||
rm -rf tests
|
|
||||||
|
|
Reference in a new issue