Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
AURA
tank
Commits
c00f5561
Commit
c00f5561
authored
May 02, 2022
by
Ernesto Rico Schmidt
Browse files
Merge branch 'feature/12-schemathesis' into 'master'
Integrate schemathesis tests into CI See merge request
!6
parents
902b4f0b
71367a11
Pipeline
#1866
failed with stages
in 28 minutes and 14 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
c00f5561
...
...
@@ -23,6 +23,7 @@ stages:
-
prepare
-
test
-
build
-
test-build
-
release
prepare
:
...
...
@@ -107,6 +108,52 @@ docker:
only
:
-
master
test-scheme
:
stage
:
test-build
needs
:
-
job
:
build-openapi-3-scheme
artifacts
:
true
image
:
name
:
schemathesis/schemathesis:stable
entrypoint
:
[
"
"
]
services
:
-
name
:
postgres:13
alias
:
postgres
-
name
:
gitlab.servus.at:5050/aura/tank:master
entrypoint
:
[
"
/bin/bash"
]
command
:
-
'
-c'
-
|
# make sure postgres is up before starting tank
while true; do
timeout 0.25 cat >/dev/null 2>&1 </dev/tcp/postgres/5432
if [ "$?" = 124 ]; then break; fi
done
# disable authentication
sed '/auth:/q' /etc/aura/tank.yaml | head -n-1 >/tmp/tank.yaml
/usr/local/bin/tank --config /tmp/tank.yaml run --listen :"$TANK_PORT"
alias
:
tank
variables
:
POSTGRES_DB
:
tank
POSTGRES_USER
:
tank
POSTGRES_PASSWORD
:
aura
TANK_DB_HOST
:
postgres
TANK_PORT
:
8040
# Enable per-build-network so that service aliases are also
# usable in the service containers themselves.
FF_NETWORK_PER_BUILD
:
1
# https://stackoverflow.com/questions/71228282/could-not-resolve-host-when-trying-to-access-service-in-gitlab
DOCKER_HOST
:
"
tcp://docker:2375"
DOCKER_TLS_CERTDIR
:
"
"
parallel
:
matrix
:
# see https://schemathesis.readthedocs.io/en/stable/cli.html#cmdoption-schemathesis-run-c
-
CHECKS
:
status_code_conformance
-
CHECKS
:
response_headers_conformance
-
CHECKS
:
response_schema_conformance
script
:
-
schemathesis run -c "$CHECKS" -b http://tank:"$TANK_PORT" --hypothesis-suppress-health-check too_slow api/docs/openapi/openapi.yaml
docker-hub-push
:
# Use the official docker image.
image
:
docker:latest
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment