Skip to content

Commit

Permalink
chore: don't test Go implementation for 500 errors
Browse files Browse the repository at this point in the history
As we don't have a generic error handler, there is no reason to have a test for such behavior.

Part of #48
  • Loading branch information
php-coder committed Apr 24, 2024
1 parent b10946d commit db5b4c2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,19 @@ jobs:
- docker-service-name: 'express-js'
database-service-name: 'mysql'
application-port: 3010
skip_500_error_testing: false
- docker-service-name: 'express-ts'
database-service-name: 'mysql'
application-port: 3020
skip_500_error_testing: false
- docker-service-name: 'chi'
database-service-name: 'mysql'
application-port: 3030
skip_500_error_testing: true
- docker-service-name: 'fastapi'
database-service-name: 'postgres'
application-port: 4040
skip_500_error_testing: false
env:
# Prevent interference between builds by setting the project name to a unique value. Otherwise
# "docker compose down" has been stopping containers (especially database) from other builds.
Expand Down Expand Up @@ -92,6 +96,7 @@ jobs:
hurl \
--error-format long \
--variable SERVER_URL=http://127.0.0.1:${{ matrix.application-port }} \
--variable skip_500_error_testing=${{ matrix.skip_500_error_testing }} \
--test \
tests/crud.hurl \
tests/misc.hurl
Expand Down
4 changes: 3 additions & 1 deletion tests/misc.hurl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Tests for various operations
#
# How to run:
# hurl --variable SERVER_URL=http://127.0.0.1:3000 misc.hurl --test
# hurl --variable SERVER_URL=http://127.0.0.1:3000 --variable skip_500_error_testing=false misc.hurl --test
#


Expand All @@ -14,6 +14,8 @@ jsonpath "$.custom" == true


GET {{ SERVER_URL }}/custom/exception
[Options]
skip: {{ skip_500_error_testing }}
HTTP 500
[Asserts]
header "Content-Type" contains "application/json"
Expand Down

0 comments on commit db5b4c2

Please sign in to comment.