aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Grote2023-07-22 08:59:56 +0200
committerMichael Grote2023-07-22 08:59:56 +0200
commit6e1c0d79dd90276f9071a57270cbb8679cf5a2d8 (patch)
tree01fb4bc572a604845aca6eb7f4b57bdbd0936cb1
parentd5f022fd1eb76322642f2623244b60c056a51c74 (diff)
ci: remove tests
-rw-r--r--.drone.yml48
1 files changed, 0 insertions, 48 deletions
diff --git a/.drone.yml b/.drone.yml
index d8a22f3..5111293 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -93,51 +93,3 @@ steps:
when:
event:
- 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