test: add contract test for discord bot

This commit is contained in:
Jack Michaud
2022-12-31 18:56:13 -05:00
committed by Andreas Köpf
parent 5c9b9e3c9f
commit 036c4b6c6c
4 changed files with 32 additions and 1 deletions
@@ -10,7 +10,11 @@ python -m print_openapi_schema > oasst-openapi.json
MOCK_SERVER_PORT=8080
docker run --init --rm -d -p $MOCK_SERVER_PORT:4010 -v $(pwd):/tmp -P stoplight/prism:4 proxy -h 0.0.0.0 "/tmp/oasst-openapi.json"
docker run --init --rm -d \
-p $MOCK_SERVER_PORT:4010 \
-v $(pwd):/tmp \
-P stoplight/prism:4 \
mock -h 0.0.0.0 "/tmp/oasst-openapi.json"
popd
+10
View File
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
# switch to backend directory
pushd "$parent_path/../../discord-bot"
pytest .
popd